mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-21 16:55:25 +03:00
Fix env not working in vite config
So the manifest can't even get the name 🤦♂️🤦♂️🤦♂️🤦♂️🤦♂️🤦♂️🤦♂️🤦♂️🤦♂️
This commit is contained in:
parent
a1fef8fd1d
commit
11c5b02832
1 changed files with 5 additions and 2 deletions
|
@ -1,10 +1,13 @@
|
|||
import preact from '@preact/preset-vite';
|
||||
import { execSync } from 'child_process';
|
||||
import { resolve } from 'path';
|
||||
import { defineConfig, splitVendorChunkPlugin } from 'vite';
|
||||
import { defineConfig, loadEnv, splitVendorChunkPlugin } from 'vite';
|
||||
import { VitePWA } from 'vite-plugin-pwa';
|
||||
|
||||
const { VITE_CLIENT_NAME: CLIENT_NAME, NODE_ENV } = process.env;
|
||||
const { VITE_CLIENT_NAME: CLIENT_NAME, NODE_ENV } = loadEnv(
|
||||
'production',
|
||||
process.cwd(),
|
||||
);
|
||||
|
||||
const commitHash = execSync('git rev-parse --short HEAD').toString().trim();
|
||||
|
||||
|
|
Loading…
Reference in a new issue