LOCKING盒子版
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

45 lines
975 B

  1. import { defineConfig } from 'umi';
  2. const isBuildingElectron = process.env.BUILD_TYPE === 'electron';
  3. export default defineConfig({
  4. nodeModulesTransform: {
  5. type: 'none',
  6. },
  7. history: {
  8. type: 'hash',
  9. },
  10. outputPath: isBuildingElectron ? 'electron/dist' : 'dist',
  11. // routes: [
  12. // { path: '/', component: '@/pages/index' },
  13. // ],
  14. fastRefresh: {},
  15. publicPath: './',
  16. theme: {
  17. 'primary-color': '#7850FF',
  18. 'app-header-height': '48px',
  19. },
  20. chainWebpack(config) {
  21. if (isBuildingElectron) {
  22. config.target('electron-renderer');
  23. }
  24. },
  25. proxy: {
  26. '/api': {
  27. target: 'http://139.198.180.242:9003',
  28. // target: 'http://www.lockingos.org:9003',
  29. //target: 'http://192.168.8.114:8082',
  30. changeOrigin: true,
  31. secure: false,
  32. },
  33. '/gateway': {
  34. target: 'http://127.0.0.1:7888',
  35. changeOrigin: true,
  36. secure: false,
  37. pathRewrite: {
  38. '^/gateway': '',
  39. },
  40. },
  41. },
  42. });