Ajout des variables d'environemment

This commit is contained in:
ElPoyo
2025-09-29 11:56:48 +02:00
parent b4a468c14b
commit 45f76cc5c8
8 changed files with 42 additions and 11 deletions

View File

@@ -1,7 +1,13 @@
import { defineConfig } from 'vite'
import { defineConfig, loadEnv } from 'vite'
import vue from '@vitejs/plugin-vue'
// https://vite.dev/config/
export default defineConfig({
plugins: [vue()],
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd())
return {
plugins: [vue()],
server: {
port: parseInt(env.VITE_PORT) || 3001
}
}
})