diff --git a/vite.config.js b/vite.config.js index ba25aeb..919b9b7 100644 --- a/vite.config.js +++ b/vite.config.js @@ -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'), @@ -27,7 +27,8 @@ export default ({ mode }) => { '@@': path.join(__dirname), }, }, + envDir: process.cwd(), envPrefix: 'VUE_', publicDir: path.resolve(__dirname, 'public'), - }) -} + } +})