From f6cf781d62635e5d94c09ddcef1c311cf23f43b9 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 22 Jan 2025 12:15:58 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20delete=20console?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 3 ++- vite.config.ts | 3 ++- yarn.lock | 5 +++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 9f84857..01c5872 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,8 @@ "query-string": "^7.1.1", "react": "^18.3.1", "react-dom": "^18.3.1", - "vite-plugin-node-polyfills": "^0.22.0" + "vite-plugin-node-polyfills": "^0.22.0", + "vite-plugin-remove-console": "^2.2.0" }, "devDependencies": { "@eslint/js": "^9.17.0", diff --git a/vite.config.ts b/vite.config.ts index 512dce7..8920c35 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,10 +1,11 @@ import { defineConfig } from 'vite'; import path from 'path'; import react from '@vitejs/plugin-react'; +import removeConsole from 'vite-plugin-remove-console'; // https://vite.dev/config/ export default defineConfig({ - plugins: [react()], + plugins: [react(), removeConsole()], resolve: { alias: { '@': path.resolve(__dirname, 'src'), diff --git a/yarn.lock b/yarn.lock index 07b9ab9..f29136d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8191,6 +8191,11 @@ vite-plugin-node-polyfills@^0.22.0: "@rollup/plugin-inject" "^5.0.5" node-stdlib-browser "^1.2.0" +vite-plugin-remove-console@^2.2.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/vite-plugin-remove-console/-/vite-plugin-remove-console-2.2.0.tgz#a73c6ba1b217b56accc5135c508b58c4df45431e" + integrity sha512-qgjh5pz75MdE9Kzs8J0kBwaCfifHV0ezRbB9rpGsIOxam+ilcGV7WOk91vFJXquzRmiKrFh3Hxlh0JJWAmXTbQ== + vite@^6.0.5: version "6.0.7" resolved "https://registry.yarnpkg.com/vite/-/vite-6.0.7.tgz#f0f8c120733b04af52b4a1e3e7cb54eb851a799b"