mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-22 01:05:34 +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 VitePluginHtmlEnv from 'vite-plugin-html-env';
|
||||||
import { VitePWA } from 'vite-plugin-pwa';
|
import { VitePWA } from 'vite-plugin-pwa';
|
||||||
|
|
||||||
const {
|
const { NODE_ENV } = process.env;
|
||||||
VITE_CLIENT_NAME: CLIENT_NAME,
|
const { VITE_CLIENT_NAME: CLIENT_NAME, VITE_APP_ERROR_LOGGING: ERROR_LOGGING } =
|
||||||
NODE_ENV,
|
loadEnv('production', process.cwd());
|
||||||
VITE_APP_ERROR_LOGGING,
|
|
||||||
} = loadEnv('production', process.cwd());
|
|
||||||
|
|
||||||
const commitHash = execSync('git rev-parse --short HEAD').toString().trim();
|
const commitHash = execSync('git rev-parse --short HEAD').toString().trim();
|
||||||
|
|
||||||
|
@ -32,7 +30,7 @@ export default defineConfig({
|
||||||
splitVendorChunkPlugin(),
|
splitVendorChunkPlugin(),
|
||||||
VitePluginHtmlEnv(),
|
VitePluginHtmlEnv(),
|
||||||
htmlPlugin({
|
htmlPlugin({
|
||||||
headScripts: VITE_APP_ERROR_LOGGING ? [rollbarCode] : [],
|
headScripts: ERROR_LOGGING ? [rollbarCode] : [],
|
||||||
}),
|
}),
|
||||||
VitePWA({
|
VitePWA({
|
||||||
manifest: {
|
manifest: {
|
||||||
|
|
Loading…
Reference in a new issue