mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-24 18:25:41 +03:00
Fix missing name & short_name inside webmanifest
Need to pass env prefix to loadEnv too
This commit is contained in:
parent
3989b218d0
commit
2bc1b8387e
1 changed files with 3 additions and 2 deletions
|
@ -9,11 +9,12 @@ import htmlPlugin from 'vite-plugin-html-config';
|
||||||
import { VitePWA } from 'vite-plugin-pwa';
|
import { VitePWA } from 'vite-plugin-pwa';
|
||||||
import removeConsole from 'vite-plugin-remove-console';
|
import removeConsole from 'vite-plugin-remove-console';
|
||||||
|
|
||||||
|
const allowedEnvPrefixes = ['VITE_', 'PHANPY_'];
|
||||||
const { NODE_ENV } = process.env;
|
const { NODE_ENV } = process.env;
|
||||||
const {
|
const {
|
||||||
PHANPY_CLIENT_NAME: CLIENT_NAME,
|
PHANPY_CLIENT_NAME: CLIENT_NAME,
|
||||||
PHANPY_APP_ERROR_LOGGING: ERROR_LOGGING,
|
PHANPY_APP_ERROR_LOGGING: ERROR_LOGGING,
|
||||||
} = loadEnv('production', process.cwd());
|
} = loadEnv('production', process.cwd(), allowedEnvPrefixes);
|
||||||
|
|
||||||
const now = new Date();
|
const now = new Date();
|
||||||
let commitHash;
|
let commitHash;
|
||||||
|
@ -35,7 +36,7 @@ const rollbarCode = fs.readFileSync(
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
base: './',
|
base: './',
|
||||||
envPrefix: ['VITE_', 'PHANPY_'],
|
envPrefix: allowedEnvPrefixes,
|
||||||
mode: NODE_ENV,
|
mode: NODE_ENV,
|
||||||
define: {
|
define: {
|
||||||
__BUILD_TIME__: JSON.stringify(now),
|
__BUILD_TIME__: JSON.stringify(now),
|
||||||
|
|
Loading…
Reference in a new issue