diff --git a/vite.config.js b/vite.config.js index 9e0fa720..48a6268c 100644 --- a/vite.config.js +++ b/vite.config.js @@ -7,11 +7,9 @@ import htmlPlugin from 'vite-plugin-html-config'; import VitePluginHtmlEnv from 'vite-plugin-html-env'; import { VitePWA } from 'vite-plugin-pwa'; -const { - VITE_CLIENT_NAME: CLIENT_NAME, - NODE_ENV, - VITE_APP_ERROR_LOGGING, -} = loadEnv('production', process.cwd()); +const { NODE_ENV } = process.env; +const { VITE_CLIENT_NAME: CLIENT_NAME, VITE_APP_ERROR_LOGGING: ERROR_LOGGING } = + loadEnv('production', process.cwd()); const commitHash = execSync('git rev-parse --short HEAD').toString().trim(); @@ -32,7 +30,7 @@ export default defineConfig({ splitVendorChunkPlugin(), VitePluginHtmlEnv(), htmlPlugin({ - headScripts: VITE_APP_ERROR_LOGGING ? [rollbarCode] : [], + headScripts: ERROR_LOGGING ? [rollbarCode] : [], }), VitePWA({ manifest: {