Remove consoles in prod
This commit is contained in:
parent
c3aef80ad4
commit
c2bf9eabc5
13
package-lock.json
generated
13
package-lock.json
generated
|
@ -37,6 +37,7 @@
|
||||||
"vite-plugin-html-config": "~1.0.11",
|
"vite-plugin-html-config": "~1.0.11",
|
||||||
"vite-plugin-html-env": "~1.2.7",
|
"vite-plugin-html-env": "~1.2.7",
|
||||||
"vite-plugin-pwa": "~0.14.0",
|
"vite-plugin-pwa": "~0.14.0",
|
||||||
|
"vite-plugin-remove-console": "~1.3.0",
|
||||||
"workbox-cacheable-response": "~6.5.4",
|
"workbox-cacheable-response": "~6.5.4",
|
||||||
"workbox-expiration": "~6.5.4",
|
"workbox-expiration": "~6.5.4",
|
||||||
"workbox-routing": "~6.5.4",
|
"workbox-routing": "~6.5.4",
|
||||||
|
@ -5471,6 +5472,12 @@
|
||||||
"workbox-window": "^6.5.4"
|
"workbox-window": "^6.5.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"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==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"node_modules/webidl-conversions": {
|
"node_modules/webidl-conversions": {
|
||||||
"version": "4.0.2",
|
"version": "4.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz",
|
||||||
|
@ -9679,6 +9686,12 @@
|
||||||
"workbox-window": "^6.5.4"
|
"workbox-window": "^6.5.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"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==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
"webidl-conversions": {
|
"webidl-conversions": {
|
||||||
"version": "4.0.2",
|
"version": "4.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz",
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
"vite-plugin-html-config": "~1.0.11",
|
"vite-plugin-html-config": "~1.0.11",
|
||||||
"vite-plugin-html-env": "~1.2.7",
|
"vite-plugin-html-env": "~1.2.7",
|
||||||
"vite-plugin-pwa": "~0.14.0",
|
"vite-plugin-pwa": "~0.14.0",
|
||||||
|
"vite-plugin-remove-console": "~1.3.0",
|
||||||
"workbox-cacheable-response": "~6.5.4",
|
"workbox-cacheable-response": "~6.5.4",
|
||||||
"workbox-expiration": "~6.5.4",
|
"workbox-expiration": "~6.5.4",
|
||||||
"workbox-routing": "~6.5.4",
|
"workbox-routing": "~6.5.4",
|
||||||
|
|
|
@ -6,6 +6,7 @@ import { defineConfig, loadEnv, splitVendorChunkPlugin } from 'vite';
|
||||||
import htmlPlugin from 'vite-plugin-html-config';
|
import htmlPlugin from 'vite-plugin-html-config';
|
||||||
import VitePluginHtmlEnv from 'vite-plugin-html-env';
|
import VitePluginHtmlEnv from 'vite-plugin-html-env';
|
||||||
import { VitePWA } from 'vite-plugin-pwa';
|
import { VitePWA } from 'vite-plugin-pwa';
|
||||||
|
import removeConsole from 'vite-plugin-remove-console';
|
||||||
|
|
||||||
const { NODE_ENV } = process.env;
|
const { NODE_ENV } = process.env;
|
||||||
const { VITE_CLIENT_NAME: CLIENT_NAME, VITE_APP_ERROR_LOGGING: ERROR_LOGGING } =
|
const { VITE_CLIENT_NAME: CLIENT_NAME, VITE_APP_ERROR_LOGGING: ERROR_LOGGING } =
|
||||||
|
@ -29,6 +30,7 @@ export default defineConfig({
|
||||||
preact(),
|
preact(),
|
||||||
splitVendorChunkPlugin(),
|
splitVendorChunkPlugin(),
|
||||||
VitePluginHtmlEnv(),
|
VitePluginHtmlEnv(),
|
||||||
|
removeConsole(),
|
||||||
htmlPlugin({
|
htmlPlugin({
|
||||||
headScripts: ERROR_LOGGING ? [rollbarCode] : [],
|
headScripts: ERROR_LOGGING ? [rollbarCode] : [],
|
||||||
}),
|
}),
|
||||||
|
|
Loading…
Reference in a new issue