vue.config.js 1006 B

12345678910111213141516171819202122232425262728293031323334353637
  1. const path = require("path");
  2. // const common = path.resolve(__dirname, "../common");
  3. // const pics = path.resolve(__dirname, "../common", "./src/assets");
  4. module.exports = {
  5. publicPath: `/${process.env.VUE_APP_ROUTER}`,
  6. // 打包文件
  7. outputDir: `${process.env.VUE_APP_ROUTER}`,
  8. productionSourceMap: false,
  9. configureWebpack: (config) => {
  10. Object.assign(config, {
  11. // 开发生产共同配置
  12. resolve: {
  13. alias: {
  14. "@": path.resolve(__dirname, "./src"),
  15. "@c": path.resolve(__dirname, "./src/components"),
  16. "@a": path.resolve(__dirname, "./src/assets"),
  17. // "@common": common,
  18. // "@p": pics,
  19. },
  20. },
  21. });
  22. },
  23. devServer: {
  24. port: "7900",
  25. //api地址前缀
  26. proxy: {
  27. "/files": {
  28. target: "http://broadcast.waityou24.cn",
  29. },
  30. "/api": {
  31. target: "http://192.168.1.19:7901", //http://192.168.1.19:9101
  32. changeOrigin: true,
  33. ws: false,
  34. },
  35. },
  36. },
  37. };