Skip to content

Commit

Permalink
load env
Browse files Browse the repository at this point in the history
  • Loading branch information
lalalune committed Oct 11, 2024
1 parent c13b0fb commit dadd16c
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import react from '@vitejs/plugin-react'
import { defineConfig } from 'vite'
import { defineConfig, loadEnv } from 'vite'

// https://vitejs.dev/config/
export default defineConfig({
base: '/RubyLive/',
plugins: [react()],
})
export default ({ mode }) => {
// Load app-level env vars to node-level env vars.
process.env = { ...process.env, ...loadEnv(mode, process.cwd()) }

return defineConfig({
base: '/RubyLive/',
plugins: [react()],
})
}

0 comments on commit dadd16c

Please sign in to comment.