mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-12-30 20:07:52 +08:00
fix: use the right env in env-config plugin
This commit is contained in:
parent
2f9195ee56
commit
132bdc309a
1 changed files with 5 additions and 0 deletions
|
|
@ -1,5 +1,10 @@
|
|||
import { Plugin } from "vite";
|
||||
import { EnvConfig } from "virtual:env-config";
|
||||
import { config as dotenvConfig } from "dotenv";
|
||||
|
||||
const envFile =
|
||||
process.env["NODE_ENV"] === "production" ? ".env.production" : ".env";
|
||||
dotenvConfig({ path: envFile });
|
||||
|
||||
const virtualModuleId = "virtual:env-config";
|
||||
const resolvedVirtualModuleId = "\0" + virtualModuleId;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue