vue.config.js 1022 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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. "/pdf": {
  32. target:"https://seec-portal.oss-cn-hangzhou.aliyuncs.com",
  33. changeOrigin: true,
  34. pathRewrite: {
  35. "^/pdf": ""
  36. }
  37. }
  38. },
  39. port: 8000,
  40. },
  41. plugins: process.env.NODE_ENV === "development" ?
  42. [
  43. new WebpackBar(),
  44. ] : []
  45. },
  46. };