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.
 
 
 
 

72 lines
1.7 KiB

  1. const path = require('path');
  2. const webpack = require('webpack');
  3. const dayjs = require('dayjs');
  4. module.exports = {
  5. configureWebpack: {
  6. resolve: {
  7. alias: {
  8. '@': path.join(__dirname, 'src'),
  9. }
  10. },
  11. // externals: {
  12. // back: 'back',
  13. // jquery: 'jQuery',
  14. // $: 'jQuery',
  15. // WebUploader: 'WebUploader',
  16. // },
  17. externals: {
  18. jquery: 'window.$',
  19. $: 'window.$'
  20. },
  21. plugins: [
  22. new webpack.DefinePlugin({
  23. 'process.env': {
  24. NODE_ENV: '"development"',
  25. API_HOST: '"/api/"',
  26. // API_HOST: '"http://47.104.91.134:9000/api/"',
  27. BUILD_TIME: `"${dayjs().format('YYYY.MM.DD HH:mm')}"`,
  28. }
  29. }),
  30. ],
  31. devServer: {
  32. proxy: {
  33. // '/api/pms': {
  34. // // target: 'http://www.lockingos.org:8089',
  35. // target:'http://192.168.8.114:8092',
  36. // changeOricgin: true,
  37. // secure: false,
  38. // },
  39. // '/api/cms': {
  40. // // target: 'http://www.lockingos.org:8089',
  41. // target:'http://192.168.8.114:8082',
  42. // changeOrigin: true,
  43. // secure: false,
  44. // },
  45. '/api': {
  46. target: 'http://www.lockingos.org:9003',
  47. //target: 'http://192.168.8.114:8082',
  48. changeOrigin: true,
  49. secure: false,
  50. }
  51. },
  52. },
  53. },
  54. css: {
  55. loaderOptions: {
  56. sass: {
  57. // 根据自己样式文件的位置调整
  58. additionalData: `@import "@/global.variable.scss";`
  59. }
  60. }
  61. },
  62. assetsDir: 'static',
  63. productionSourceMap: false,
  64. // configureWebpack: config => {
  65. // console.log('????')
  66. // return config;
  67. // }
  68. }