2024-07-02 17:07:17 +02:00
|
|
|
import { defineConfig, loadEnv } from 'vite'
|
2024-06-24 15:42:01 +02:00
|
|
|
import react from '@vitejs/plugin-react'
|
2024-07-02 20:05:46 +02:00
|
|
|
import tsconfigPaths from 'vite-tsconfig-paths'
|
2024-06-24 15:42:01 +02:00
|
|
|
|
|
|
|
|
// https://vitejs.dev/config/
|
2024-07-02 20:05:46 +02:00
|
|
|
export default defineConfig(({ mode }) => {
|
|
|
|
|
const env = loadEnv(mode, process.cwd())
|
2024-07-02 17:07:17 +02:00
|
|
|
return {
|
2024-07-02 20:05:46 +02:00
|
|
|
plugins: [react(), tsconfigPaths()],
|
2024-07-02 17:07:17 +02:00
|
|
|
server: {
|
|
|
|
|
port: parseInt(env.VITE_PORT) || 3000,
|
|
|
|
|
host: env.VITE_HOST || 'localhost',
|
|
|
|
|
},
|
|
|
|
|
}
|
2024-06-24 15:42:01 +02:00
|
|
|
})
|