|
1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- import { defineConfig } from 'umi';
-
- const isBuildingElectron = process.env.BUILD_TYPE === 'electron';
-
- export default defineConfig({
- nodeModulesTransform: {
- type: 'none',
- },
- history: {
- type: 'hash',
- },
- outputPath: isBuildingElectron ? 'electron/dist' : 'dist',
- // routes: [
- // { path: '/', component: '@/pages/index' },
- // ],
- fastRefresh: {},
- publicPath: './',
- theme: {
- 'primary-color': '#7850FF',
- 'app-header-height': '48px',
- },
- chainWebpack(config) {
- if (isBuildingElectron) {
- config.target('electron-renderer');
- }
- },
- proxy: {
- '/api': {
- target: 'http://139.198.180.242:9003',
- // target: 'http://www.lockingos.org:9003',
- //target: 'http://192.168.8.114:8082',
- changeOrigin: true,
- secure: false,
- },
- '/gateway': {
- target: 'http://127.0.0.1:7888',
- changeOrigin: true,
- secure: false,
- pathRewrite: {
- '^/gateway': '',
- },
- },
- },
- });
|