import { defineConfig } from "umi";

export default defineConfig({
  base: '/',
  favicons: [
    '/favicon.ico'
  ],
  styles: [
    '//at.alicdn.com/t/c/font_4676747_2fcjmdv7h6f.css'
  ],
  metas: [
    { name: 'viewport', content: 'width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' }
  ],
  scripts: [
    // 字体加载
    // '//ajax.googleapis.com/ajax/libs/webfont/1.6.26/webfont.js'
    '//at.alicdn.com/t/c/font_4676747_tigpugzo8xc.js'
  ],
  plugins: [
    require.resolve('@umijs/plugins/dist/unocss'),
    require.resolve('@umijs/plugins/dist/model'),
    require.resolve('@umijs/plugins/dist/initial-state'),
  ],
  model: {},
  unocss: {
    watch: ['src/**/*.tsx']
  },
  icons: {
    autoInstall: {}
  },
  routes: [
    { path: "/", component: "home" },
    { path: "/flow", component: "flow" },
    { path: "/mindmap", component: "mindmap" },
    { path: "/*", component: '404' }
  ],
  npmClient: 'pnpm'
});
