You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.3 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. const { defineConfig } = require("@vue/cli-service");
  2. const NodePolyfillPlugin = require("node-polyfill-webpack-plugin")
  3. module.exports = defineConfig({
  4. transpileDependencies: true,
  5. lintOnSave: false,
  6. configureWebpack: {
  7. plugins: [
  8. new NodePolyfillPlugin()
  9. ],
  10. resolve: {
  11. fallback: {
  12. fs: false,
  13. crypto: false
  14. }
  15. },
  16. externals: {
  17. './cptable': 'var cptable',
  18. },
  19. },
  20. devServer: {
  21. port: "8080",
  22. proxy: {
  23. "/api": {
  24. target: "http://192.168.1.108:44358",
  25. changeorigin: true, // 在本会创建一个虚拟服务满,然后发送清求的数,并同时接收济求的数,这样服务端和服务减进行数据的交互就不会有域问题
  26. rewite: (path) => path.replace(/^\/api/, ""),
  27. // pathRewrite: {
  28. // "^/api": ''
  29. // }
  30. },
  31. },
  32. }
  33. // pages: {
  34. // index: {
  35. // entry: 'src/main.js',
  36. // template: 'src/App.vue',
  37. // filname: 'index.html'
  38. // },
  39. // about: {
  40. // entry: 'src/main.js',
  41. // template: 'src/App.vue',
  42. // filname: 'about.html'
  43. // },
  44. // }
  45. });