vue.config.js 676 B

12345678910111213141516171819202122232425262728293031
  1. const path = require("path");
  2. module.exports = {
  3. publicPath: "/",
  4. // 双页面配置
  5. // pages: {
  6. // index: 'src/views/index/main.js',
  7. // },
  8. configureWebpack: config => {
  9. Object.assign(config, {
  10. // 开发生产共同配置
  11. resolve: {
  12. alias: {
  13. "@": path.resolve(__dirname, "./src"),
  14. "@c": path.resolve(__dirname, "./src/components"),
  15. "@a": path.resolve(__dirname, "./src/assets")
  16. }
  17. }
  18. });
  19. },
  20. devServer: {
  21. port: "8001",
  22. //api地址前缀
  23. proxy: {
  24. "/weixin": {
  25. target: "http://smart.cc-lotus.info",
  26. changeOrigin: true,
  27. ws: true
  28. }
  29. }
  30. }
  31. };