vue.config.js 648 B

123456789101112131415161718192021222324252627282930
  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: true,
  15. open: true,
  16. liveReload: false,
  17. // 设置代理proxy
  18. proxy: {
  19. '/__api': {
  20. // target: 'http://192.168.0.135:8585/',
  21. target: 'https://testhuodiao.4dkankan.com/',
  22. changeOrigin: true,
  23. pathRewrite: {
  24. ['^/__api']: ''
  25. }
  26. }
  27. }
  28. }
  29. }