vue.config.js 632 B

1234567891011121314151617181920212223242526272829
  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. // 设置代理proxy
  17. proxy: {
  18. '/__api': {
  19. // target: 'http://192.168.0.98:8285/',
  20. target: 'https://testhuodiao.4dkankan.com/',
  21. changeOrigin: true,
  22. pathRewrite: {
  23. ['^/__api']: ''
  24. }
  25. }
  26. }
  27. }
  28. }