vue.config.js 832 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. const WebpackBar = require("webpackbar");
  2. module.exports = {
  3. productionSourceMap: false,
  4. publicPath: process.env.BASE_URL,
  5. chainWebpack: config => {
  6. config
  7. .plugin("html")
  8. .tap(args => {
  9. // NOTE 确定系统正式名称
  10. args[0].title = "SEEC门户系统";
  11. return args;
  12. });
  13. },
  14. css: {
  15. loaderOptions: {
  16. sass: {
  17. implementation: require("sass"),
  18. },
  19. },
  20. },
  21. configureWebpack: {
  22. devServer: {
  23. proxy: {
  24. "/api": {
  25. // target: "https://p-server.seec.seecoder.cn/api",
  26. target: "http://localhost:8080/api",
  27. pathRewrite: {
  28. "^/api": ""
  29. }
  30. }
  31. },
  32. port: 8000,
  33. },
  34. plugins: process.env.NODE_ENV === "development" ?
  35. [
  36. new WebpackBar(),
  37. ] : []
  38. },
  39. };