mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-21 16:55:25 +03:00
Fix NODE_ENV not even working here
This commit is contained in:
parent
07dff34e20
commit
89cb909094
1 changed files with 4 additions and 6 deletions
|
@ -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: {
|
||||
|
|
Loading…
Reference in a new issue