60b966f59e
* fix: test cases * fix env used by file manager * default value of process.env.LOCAL_STORAGE_BASE_URL * use workspace dependencies * refactor some env to adapt more scenario * fix reviewing issues * fix env default value * update umi config * bugfix * fix shared cache Co-authored-by: chenos <chenlinxh@gmail.com>
42 lines
974 B
TypeScript
42 lines
974 B
TypeScript
import path from 'path';
|
|
import { defineConfig } from 'umi';
|
|
import dotenv from 'dotenv';
|
|
import { getUmiConfig } from '@nocobase/utils';
|
|
|
|
dotenv.config({
|
|
path: path.resolve(__dirname, '../../.env'),
|
|
});
|
|
|
|
process.env.MFSU_AD = 'none';
|
|
|
|
const umiConfig = getUmiConfig();
|
|
|
|
export default defineConfig({
|
|
nodeModulesTransform: {
|
|
type: 'none',
|
|
},
|
|
define: {
|
|
...umiConfig.define,
|
|
},
|
|
// only proxy when using `umi dev`
|
|
// if the assets are built, will not proxy
|
|
proxy: {
|
|
...umiConfig.proxy,
|
|
},
|
|
routes: [
|
|
{ path: '/', exact: false, component: '@/pages/index' },
|
|
],
|
|
fastRefresh: {},
|
|
locale: {
|
|
default: 'zh-CN',
|
|
// antd: false,
|
|
// title: false,
|
|
baseNavigator: false,
|
|
baseSeparator: '-',
|
|
},
|
|
chainWebpack(config) {
|
|
config.module.rules.get('ts-in-node_modules').include.add(path.resolve(__dirname, '../client/src'));
|
|
config.resolve.alias.set('@nocobase/client', path.resolve(__dirname, '../client/src'));
|
|
},
|
|
});
|