Skip to content

Commit

Permalink
🐛 Fix environment loading
Browse files Browse the repository at this point in the history
  • Loading branch information
Anthony Du Pont committed Apr 20, 2022
1 parent 6eb33e3 commit d83b216
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ import vue from '@vitejs/plugin-vue'
import glsl from 'vite-plugin-glsl'

// Custom Configuration
export default ({ mode }) => {
export default defineConfig(({ mode }) => {
process.env = { ...process.env, ...loadEnv(mode, process.cwd()) }

return defineConfig({
return {
root: path.join(__dirname, 'src'),
build: {
outDir: path.join(__dirname, 'dist'),
Expand All @@ -27,7 +27,8 @@ export default ({ mode }) => {
'@@': path.join(__dirname),
},
},
envDir: process.cwd(),
envPrefix: 'VUE_',
publicDir: path.resolve(__dirname, 'public'),
})
}
}
})

0 comments on commit d83b216

Please sign in to comment.