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.

53 lines
1.5 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
1 year 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. host: '0.0.0.0',
  22. port: "8081",
  23. // proxy: {
  24. // "/api": {
  25. // target: "http://135.191.65.118:8080",
  26. // changeorigin: true, // 在本会创建一个虚拟服务满,然后发送清求的数,并同时接收济求的数,这样服务端和服务减进行数据的交互就不会有域问题
  27. // rewite: (path) => path.replace(/^\/api/, ""),
  28. // // pathRewrite: {
  29. // // "^/api": ''
  30. // // }
  31. // },
  32. // },
  33. },
  34. terser: {
  35. terserOptions: {
  36. compress: {
  37. drop_console: true,
  38. drop_debugger: true
  39. }
  40. }
  41. }
  42. // pages: {
  43. // index: {
  44. // entry: 'src/main.js',
  45. // template: 'src/App.vue',
  46. // filname: 'index.html'
  47. // },
  48. // about: {
  49. // entry: 'src/main.js',
  50. // template: 'src/App.vue',
  51. // filname: 'about.html'
  52. // },
  53. // }
  54. });