diff --git a/package-lock.json b/package-lock.json index 20bb999..6e13504 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8,6 +8,7 @@ "name": "xbu", "version": "0.0.0", "hasInstallScript": true, + "license": "MIT", "dependencies": { "@chakra-ui/react": "2.8.2", "@emotion/react": "11.11.4", @@ -69,6 +70,7 @@ "vite-plugin-html": "3.2.2", "vite-plugin-image-optimizer": "1.1.7", "vite-plugin-minify": "1.5.2", + "vite-plugin-remove-console": "2.2.0", "vite-plugin-webfont-dl": "3.9.4", "vitest": "1.5.2" }, @@ -13310,6 +13312,12 @@ "vite": "*" } }, + "node_modules/vite-plugin-remove-console": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/vite-plugin-remove-console/-/vite-plugin-remove-console-2.2.0.tgz", + "integrity": "sha512-qgjh5pz75MdE9Kzs8J0kBwaCfifHV0ezRbB9rpGsIOxam+ilcGV7WOk91vFJXquzRmiKrFh3Hxlh0JJWAmXTbQ==", + "dev": true + }, "node_modules/vite-plugin-webfont-dl": { "version": "3.9.4", "resolved": "https://registry.npmjs.org/vite-plugin-webfont-dl/-/vite-plugin-webfont-dl-3.9.4.tgz", @@ -23277,6 +23285,12 @@ "html-minifier-terser": "^6.1.0" } }, + "vite-plugin-remove-console": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/vite-plugin-remove-console/-/vite-plugin-remove-console-2.2.0.tgz", + "integrity": "sha512-qgjh5pz75MdE9Kzs8J0kBwaCfifHV0ezRbB9rpGsIOxam+ilcGV7WOk91vFJXquzRmiKrFh3Hxlh0JJWAmXTbQ==", + "dev": true + }, "vite-plugin-webfont-dl": { "version": "3.9.4", "resolved": "https://registry.npmjs.org/vite-plugin-webfont-dl/-/vite-plugin-webfont-dl-3.9.4.tgz", diff --git a/package.json b/package.json index 56efb2e..6786f65 100644 --- a/package.json +++ b/package.json @@ -84,6 +84,7 @@ "vite-plugin-html": "3.2.2", "vite-plugin-image-optimizer": "1.1.7", "vite-plugin-minify": "1.5.2", + "vite-plugin-remove-console": "2.2.0", "vite-plugin-webfont-dl": "3.9.4", "vitest": "1.5.2" } diff --git a/vite.config.ts b/vite.config.ts index 5e0e9f9..f294471 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -1,18 +1,18 @@ /// -import { defineConfig, splitVendorChunkPlugin } from 'vite'; +import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; import million from 'million/compiler'; import compression from 'vite-plugin-compression'; import webfontDownload from 'vite-plugin-webfont-dl'; import { ViteImageOptimizer } from 'vite-plugin-image-optimizer'; import { createHtmlPlugin } from 'vite-plugin-html'; +import removeConsole from 'vite-plugin-remove-console'; import path from 'path'; export default defineConfig({ plugins: [ million.vite({ auto: true }), - splitVendorChunkPlugin(), react(), webfontDownload( [ @@ -26,6 +26,7 @@ export default defineConfig({ proxy: false, }, ), + removeConsole(), createHtmlPlugin({ minify: true }), compression({ algorithm: 'brotliCompress',