vue.config.js 877 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. const { defineConfig } = require("@vue/cli-service");
  2. const { resolve } = require("path");
  3. const port = 9010;
  4. const name = "退役军人职业教育基地";
  5. module.exports = defineConfig({
  6. transpileDependencies: true,
  7. lintOnSave: false,
  8. outputDir: process.env.ENV + "-dist",
  9. devServer: {
  10. host: "0.0.0.0",
  11. port,
  12. proxy: {
  13. // 开发模式请求基础api反代理
  14. [process.env.VUE_APP_BASE_API]: {
  15. target: `https://wx.hw.hongweisoft.com/veterans`,
  16. changeOrigin: true,
  17. pathRewrite: {
  18. ["^" + process.env.VUE_APP_BASE_API]: "",
  19. },
  20. }
  21. },
  22. },
  23. configureWebpack: {
  24. name,
  25. resolve: {
  26. alias: {
  27. "@": resolve("src"),
  28. },
  29. },
  30. },
  31. chainWebpack(config) {
  32. config.plugin("html").tap((args) => {
  33. // 标题
  34. args[0].title = name;
  35. return args;
  36. });
  37. },
  38. });