diff --git a/package.json b/package.json index 14cd1c3b..8dd9df3e 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,7 @@ "html2canvas": "^1.4.1", "json-editor-vue3": "^1.0.6", "jspdf": "^2.5.1", + "node-polyfill-webpack-plugin": "^4.0.0", "nprogress": "0.2.0", "print-js": "^1.6.0", "qrcodejs2": "0.0.2", diff --git a/vue.config.js b/vue.config.js index 6713a56c..3090250b 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,5 +1,5 @@ const { defineConfig } = require('@vue/cli-service') - +const NodePolyfillPlugin = require("node-polyfill-webpack-plugin"); module.exports = defineConfig({ //设置为空打包后不分更目录还是多级目录 publicPath:'', @@ -85,6 +85,7 @@ module.exports = defineConfig({ stream: false, } }, + plugins: [new NodePolyfillPlugin()], externals:{ './cptable':'var cptable' }