vue.config.js 722 B

1234567891011121314151617181920212223242526272829303132
  1. module.exports = {
  2. assetsDir: process.env.VUE_APP_STATIC_URL,
  3. publicPath: process.env.NODE_ENV === 'production' ? '' : '',
  4. productionSourceMap: false,
  5. pluginOptions: {
  6. 'style-resources-loader': {
  7. preProcessor: 'scss',
  8. patterns: []
  9. }
  10. },
  11. outputDir: 'dist',
  12. devServer: {
  13. inline: false,
  14. hot: false,
  15. liveReload: false,
  16. // https:true,
  17. // port:8080,
  18. // 设置代理proxy
  19. proxy: {
  20. '/__api': {
  21. target: 'http://192.168.0.135:8585/',
  22. // target: 'https://testxfhd.4dkankan.com',
  23. // target: 'https://testhuodiao.4dkankan.com/',
  24. changeOrigin: true,
  25. pathRewrite: {
  26. ['^/__api']: ''
  27. }
  28. }
  29. }
  30. }
  31. }