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.
 
 
 
 

53 lines
1.0 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': {
  31. target: 'http://47.104.91.134:8080',
  32. // target: 'http://10.240.32.236:8080',
  33. changeOrigin: true,
  34. secure: false,
  35. }
  36. },
  37. },
  38. },
  39. css: {
  40. loaderOptions: {
  41. sass: {
  42. // 根据自己样式文件的位置调整
  43. additionalData: `@import "@/global.variable.scss";`
  44. }
  45. }
  46. }
  47. // configureWebpack: config => {
  48. // console.log('????')
  49. // return config;
  50. // }
  51. }