vue.config.js 1.0 KB

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