25 lines
640 B
TypeScript
25 lines
640 B
TypeScript
import { fileURLToPath, URL } from 'node:url'
|
|
import babel from '@rolldown/plugin-babel'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
import { tanstackRouter } from '@tanstack/router-plugin/vite'
|
|
import react, { reactCompilerPreset } from '@vitejs/plugin-react'
|
|
import { defineConfig } from 'vite'
|
|
|
|
// https://vite.dev/config/
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
},
|
|
},
|
|
plugins: [
|
|
tanstackRouter({
|
|
target: 'react',
|
|
autoCodeSplitting: true,
|
|
}),
|
|
tailwindcss(),
|
|
react(),
|
|
babel({ presets: [reactCompilerPreset()] }),
|
|
],
|
|
})
|