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.
 
 
 
 

65 lines
1.4 KiB

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