import { defineConfig } from 'umi'; const isBuildingElectron = process.env.BUILD_TYPE === 'electron'; export default defineConfig({ nodeModulesTransform: { type: 'none', }, history: { type: 'hash', }, // 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, }, }, define: { 'global.URL_PREFIX': isBuildingElectron ? 'http://139.198.180.242:9003/' : '', }, });