05ecb25d1b
* feat: create nocobase app with simple & quickstart option * chore: delete template file * create-nocobase-app: add env API_PORT fallback * chore: log * env default fallback * move config dir * change has yarn * chore: prettier * fix: npm running issue * database testing support sqlite * once... * chore: typo * fix: sqlite test * update readme * feat: copy .env.example to .env at create-nocobase-app * create-nocobase-app: change sqlite3 to github master * create-nocobase-app: .env template * create-nocobase-app: update .env * chore: typo * update README * chore: Application constructor * feat: sqlite demo data support * fix test * fix: application error * chore: plugin-client run sql * fix: application createCli * fix: can choose whether to register actions * chore: model compile error * fix: support sqlite * fix: demo data set index sequence on postgresql * chore: code reduce * fix: operators are compatible with sqlite * add impor demo option to init command * update env Co-authored-by: chenos <chenlinxh@gmail.com>
36 lines
792 B
TypeScript
36 lines
792 B
TypeScript
import { defineConfig } from 'umi';
|
|
import dotenv from 'dotenv';
|
|
import path from 'path';
|
|
|
|
dotenv.config({
|
|
path: path.resolve(__dirname, './.env'),
|
|
});
|
|
|
|
export default defineConfig({
|
|
nodeModulesTransform: {
|
|
type: 'none',
|
|
},
|
|
define: {
|
|
'process.env.API_URL': process.env.API_URL || "http://127.0.0.1",
|
|
'process.env.API_PORT': process.env.API_PORT || "13001",
|
|
},
|
|
proxy: {
|
|
'/api': {
|
|
'target': `http://localhost:${process.env.API_PORT || "13001"}/`,
|
|
'changeOrigin': true,
|
|
'pathRewrite': { '^/api': '/api' },
|
|
},
|
|
},
|
|
routes: [
|
|
{ path: '/', exact: false, component: '@/pages/index' },
|
|
],
|
|
fastRefresh: {},
|
|
locale: {
|
|
default: 'zh-CN',
|
|
// antd: false,
|
|
// title: false,
|
|
baseNavigator: false,
|
|
baseSeparator: '-',
|
|
},
|
|
});
|