vue.config.js 977 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. const { defineConfig } = require("@vue/cli-service");
  2. const proxy_url = process.env.VUE_APP_PROXY_URL;
  3. const NodePolyfillPlugin = require('node-polyfill-webpack-plugin')
  4. module.exports = defineConfig({
  5. transpileDependencies: true,
  6. lintOnSave: false,
  7. assetsDir: "showviewer",
  8. productionSourceMap: false,
  9. publicPath: "./",
  10. configureWebpack: {
  11. plugins: [new NodePolyfillPlugin()],
  12. },
  13. pages: {
  14. show: "src/pages/show.js",
  15. showMobile: "src/pages/showMobile.js",
  16. },
  17. css: {
  18. extract: false,
  19. loaderOptions: {
  20. scss: {},
  21. },
  22. },
  23. devServer: {
  24. // port: 443,
  25. // https: true,
  26. headers: {
  27. "Cache-Control": "no-store",
  28. },
  29. proxy: {
  30. "/manage": {
  31. target: proxy_url,
  32. changeOrigin: true,
  33. },
  34. "/web": {
  35. target: proxy_url,
  36. changeOrigin: true,
  37. },
  38. "/api": {
  39. target: process.env.VUE_APP_PROXY_URL_ROOT,
  40. changeOrigin: true,
  41. },
  42. },
  43. },
  44. });