Commit 1343ee216d061402605451ff10b033a0f3c13a5b

Authored by 史婷婷
1 parent d8b16cf0

feat: micro-app-template-stt-定制部门临时版本3

Showing 2 changed files with 53 additions and 2 deletions
... ... @@ -18,5 +18,5 @@
18 18 /src/.umi-production
19 19 /src/.umi-test
20 20 /.env.local
21   -/.umirc.ts
22   -/.umirc.js
  21 +/.idea
  22 +.idea
... ...
  1 +import { defineConfig } from 'umi';
  2 +import pkg from './package.json';
  3 +import routes from './src/routes';
  4 +import path from "path";
  5 +
  6 +export default defineConfig({
  7 + esbuild: {},
  8 + base: '/',
  9 + publicPath: '/xgd/', // 需要跟getCorpFunSetting接口返回保持一致(也就是服务器上文件的名称)
  10 + mountElementId: pkg.name,
  11 + webpack5: {
  12 + lazyCompilation: {},
  13 + },
  14 + runtimePublicPath: false,
  15 + nodeModulesTransform: {
  16 + type: 'none',
  17 + },
  18 + history: {
  19 + type: 'hash'
  20 + },
  21 + // 按需加载配置 在本地注入到环境上时 需要注释掉
  22 + // start
  23 + // hash: true,
  24 + // // 启用按需加载
  25 + // dynamicImport: {
  26 + // loading: '@/components/qx-page-loading',
  27 + // },
  28 + // end
  29 + title: false,
  30 + lessLoader: {
  31 + globalVars: {
  32 + theme: 'true;@import "~@/variable.less"',
  33 + }
  34 + },
  35 + antd: {
  36 + config: {
  37 + }
  38 + },
  39 + theme: {
  40 + 'root-entry-name': 'variable'
  41 + },
  42 + routes,
  43 + fastRefresh: {},
  44 + qiankun: {
  45 + slave: {},
  46 + },
  47 + chainWebpack(memo, { env, webpack, createCSSRule }) {
  48 + // 设置 alias
  49 + // memo.resolve.alias.set('@/src', path.resolve(__dirname, './src'));
  50 + },
  51 +});
... ...