init
This commit is contained in:
23
vite.config.js
Normal file
23
vite.config.js
Normal file
@@ -0,0 +1,23 @@
|
||||
import {defineConfig, loadEnv} from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import { fileURLToPath, URL } from 'node:url'
|
||||
|
||||
export default defineConfig(async ({mode}) => {
|
||||
const env = loadEnv(mode, process.cwd(), '')
|
||||
console.log('🚀 Running Vite in mode:', mode)
|
||||
|
||||
return {
|
||||
plugins: [
|
||||
vue(),
|
||||
// пример: включаем devtools только в development/staging
|
||||
env.VITE_ENABLE_DEVTOOLS === 'true'
|
||||
? (await import('vite-plugin-vue-devtools')).default()
|
||||
: undefined
|
||||
].filter(Boolean),
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
||||
},
|
||||
},
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user