From e8a6e17c70aab459e4b0025ae0212e8a17908b39 Mon Sep 17 00:00:00 2001 From: zty Date: Wed, 5 Jun 2024 16:37:57 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E4=BF=AE=E6=94=B9node=E7=89=88=E6=9C=AC?= =?UTF-8?q?=E8=BF=87=E9=AB=98=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + vue.config.js | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) 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' }