We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2f9195e commit 132bdc3Copy full SHA for 132bdc3
frontend/vite-plugins/env-config.ts
@@ -1,5 +1,10 @@
1
import { Plugin } from "vite";
2
import { EnvConfig } from "virtual:env-config";
3
+import { config as dotenvConfig } from "dotenv";
4
+
5
+const envFile =
6
+ process.env["NODE_ENV"] === "production" ? ".env.production" : ".env";
7
+dotenvConfig({ path: envFile });
8
9
const virtualModuleId = "virtual:env-config";
10
const resolvedVirtualModuleId = "\0" + virtualModuleId;
0 commit comments