From 21f9b3c4c6931c6c3172335777bc940118b51739 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Tue, 14 Feb 2023 19:10:21 +0800 Subject: [PATCH] Upgrade vite-plugin-remove-console Includes all other console.* methods too --- package-lock.json | 14 +++++++------- package.json | 2 +- vite.config.js | 4 +++- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index 69b36e09..8959406d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -43,7 +43,7 @@ "vite-plugin-html-config": "~1.0.11", "vite-plugin-html-env": "~1.2.7", "vite-plugin-pwa": "~0.14.4", - "vite-plugin-remove-console": "~1.3.0", + "vite-plugin-remove-console": "~2.0.0", "workbox-cacheable-response": "~6.5.4", "workbox-expiration": "~6.5.4", "workbox-routing": "~6.5.4", @@ -6699,9 +6699,9 @@ } }, "node_modules/vite-plugin-remove-console": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/vite-plugin-remove-console/-/vite-plugin-remove-console-1.3.0.tgz", - "integrity": "sha512-5a/OLYB6yNRHMuHj9rBQRYMQ1NBKffxA8BaD77urUBLcGOWMHFHALjh6C26wZfZd41KytSwLp6DhvNKU78mNJg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/vite-plugin-remove-console/-/vite-plugin-remove-console-2.0.0.tgz", + "integrity": "sha512-bEsyShSacsunbm0X1zaVliwgmWlsaBPLk7FN4wr2xQMs8zSZPSwpRNTT5UZiF0+cfMEkN4VVnofITawmT3pjgQ==", "dev": true }, "node_modules/webidl-conversions": { @@ -11587,9 +11587,9 @@ } }, "vite-plugin-remove-console": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/vite-plugin-remove-console/-/vite-plugin-remove-console-1.3.0.tgz", - "integrity": "sha512-5a/OLYB6yNRHMuHj9rBQRYMQ1NBKffxA8BaD77urUBLcGOWMHFHALjh6C26wZfZd41KytSwLp6DhvNKU78mNJg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/vite-plugin-remove-console/-/vite-plugin-remove-console-2.0.0.tgz", + "integrity": "sha512-bEsyShSacsunbm0X1zaVliwgmWlsaBPLk7FN4wr2xQMs8zSZPSwpRNTT5UZiF0+cfMEkN4VVnofITawmT3pjgQ==", "dev": true }, "webidl-conversions": { diff --git a/package.json b/package.json index 7fd33010..4151c5b4 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "vite-plugin-html-config": "~1.0.11", "vite-plugin-html-env": "~1.2.7", "vite-plugin-pwa": "~0.14.4", - "vite-plugin-remove-console": "~1.3.0", + "vite-plugin-remove-console": "~2.0.0", "workbox-cacheable-response": "~6.5.4", "workbox-expiration": "~6.5.4", "workbox-routing": "~6.5.4", diff --git a/vite.config.js b/vite.config.js index 916aaaaf..e743151c 100644 --- a/vite.config.js +++ b/vite.config.js @@ -30,7 +30,9 @@ export default defineConfig({ preact(), splitVendorChunkPlugin(), VitePluginHtmlEnv(), - removeConsole(), + removeConsole({ + includes: ['log', 'debug', 'info', 'warn', 'error'], + }), htmlPlugin({ headScripts: ERROR_LOGGING ? [rollbarCode] : [], }),