We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c13b0fb commit dadd16cCopy full SHA for dadd16c
vite.config.ts
@@ -1,8 +1,12 @@
1
import react from '@vitejs/plugin-react'
2
-import { defineConfig } from 'vite'
+import { defineConfig, loadEnv } from 'vite'
3
4
-// https://vitejs.dev/config/
5
-export default defineConfig({
6
- base: '/RubyLive/',
7
- plugins: [react()],
8
-})
+export default ({ mode }) => {
+ // Load app-level env vars to node-level env vars.
+ process.env = { ...process.env, ...loadEnv(mode, process.cwd()) }
+
+ return defineConfig({
9
+ base: '/RubyLive/',
10
+ plugins: [react()],
11
+ })
12
+}
0 commit comments