From 5920ddfcf3424b1d8a81588a558279679da5eeed Mon Sep 17 00:00:00 2001 From: Elton Chou Date: Wed, 21 Aug 2024 19:08:24 +0800 Subject: [PATCH] build: Add polyfill. --- package.json | 1 + webpack.config.js | 1 + yarn.lock | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/package.json b/package.json index c3635ff5..637024be 100644 --- a/package.json +++ b/package.json @@ -31,6 +31,7 @@ "select-dom": "^7.1.1", "stream-browserify": "^3.0.0", "util": "^0.12.5", + "vm-browserify": "^1.1.2", "webextension-polyfill": "^0.10.0" }, "devDependencies": { diff --git a/webpack.config.js b/webpack.config.js index 719d8dd7..62a03ff4 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -24,6 +24,7 @@ const config = { crypto: require.resolve('crypto-browserify'), stream: require.resolve('stream-browserify'), util: require.resolve('util/'), + vm: require.resolve('vm-browserify'), }, alias: { '@backend': path.resolve(__dirname, 'src/backend/'), diff --git a/yarn.lock b/yarn.lock index f13884e6..755b4143 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10211,6 +10211,11 @@ verror@1.10.0: core-util-is "1.0.2" extsprintf "^1.2.0" +vm-browserify@^1.1.2: + version "1.1.2" + resolved "https://registry.yarnpkg.com/vm-browserify/-/vm-browserify-1.1.2.tgz#78641c488b8e6ca91a75f511e7a3b32a86e5dda0" + integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ== + vue-eslint-parser@^8.0.1: version "8.3.0" resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-8.3.0.tgz#5d31129a1b3dd89c0069ca0a1c88f970c360bd0d"