14 lines
331 B
JavaScript
14 lines
331 B
JavaScript
import { defineConfig, loadEnv } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
|
|
// https://vitejs.dev/config/
|
|
export default defineConfig(({ mode }) => {
|
|
const env = loadEnv(mode, process.cwd(), '');
|
|
return {
|
|
define: {
|
|
'process.env.SOME_KEY': JSON.stringify(env.SOME_KEY)
|
|
},
|
|
plugins: [react()],
|
|
}
|
|
})
|