mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-24 10:15:37 +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 preact from '@preact/preset-vite';
|
||||||
import { execSync } from 'child_process';
|
import { execSync } from 'child_process';
|
||||||
import { resolve } from 'path';
|
import { resolve } from 'path';
|
||||||
import { defineConfig, splitVendorChunkPlugin } from 'vite';
|
import { defineConfig, loadEnv, splitVendorChunkPlugin } from 'vite';
|
||||||
import { VitePWA } from 'vite-plugin-pwa';
|
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();
|
const commitHash = execSync('git rev-parse --short HEAD').toString().trim();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue