vue.config.js 594 B

123456789101112131415161718192021222324252627
  1. module.exports = {
  2. publicPath: process.env.NODE_ENV === "production" ? "/" : "/",
  3. productionSourceMap: false,
  4. lintOnSave: false,
  5. publicPath: '/',
  6. devServer: {
  7. host: 'localhost',
  8. port: 8080,
  9. proxy: {
  10. "/dev": {
  11. target: "http://localhost:8087",
  12. changeOrigin: true,
  13. pathRewrite: {
  14. "/dev": ""
  15. }
  16. }
  17. }
  18. },
  19. configureWebpack: {
  20. // 把原本需要写在webpack.config.js中的配置代码 写在这里 会自动合并
  21. externals: {
  22. 'jquery' : '$',
  23. 'echarts': 'echarts',
  24. 'axios' : 'axios'
  25. }
  26. }
  27. };