refactor: conditionally skip removeConsole plugin based on VITE_ALLOW_CONSOLE_LOGS env

This commit is contained in:
Zack Spear
2024-10-10 16:19:00 -07:00
committed by Eli Bosley
parent 14d9448e4c
commit b1409684db

View File

@@ -68,8 +68,8 @@ export default defineNuxtConfig({
// },
vite: {
plugins: [
removeConsole({
includes: process.env.VITE_ALLOW_CONSOLE_LOGS ? [] : ["log", "warn", "error", "info", "debug"],
!process.env.VITE_ALLOW_CONSOLE_LOGS && removeConsole({
includes: ["log", "warn", "error", "info", "debug"],
}),
],
build: {