38 lines
1.1 KiB
TypeScript
38 lines
1.1 KiB
TypeScript
import { URL, fileURLToPath } from 'node:url'
|
|
import { defineConfig } from 'vite'
|
|
import { devtools } from '@tanstack/devtools-vite'
|
|
import viteReact from '@vitejs/plugin-react'
|
|
import tailwindcss from '@tailwindcss/vite'
|
|
|
|
import { tanstackRouter } from '@tanstack/router-plugin/vite'
|
|
|
|
export default defineConfig({
|
|
plugins: [
|
|
devtools(),
|
|
tanstackRouter({
|
|
target: 'react',
|
|
autoCodeSplitting: true,
|
|
}),
|
|
viteReact(),
|
|
tailwindcss(),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
'@components': fileURLToPath(
|
|
new URL('./src/components', import.meta.url),
|
|
),
|
|
'@routes': fileURLToPath(new URL('./src/routes', import.meta.url)),
|
|
'@lib': fileURLToPath(new URL('./src/lib', import.meta.url)),
|
|
'@stores': fileURLToPath(new URL('./src/stores', import.meta.url)),
|
|
'@containers': fileURLToPath(
|
|
new URL('./src/containers', import.meta.url),
|
|
),
|
|
'@interfaces': fileURLToPath(
|
|
new URL('./src/interfaces', import.meta.url),
|
|
),
|
|
'@api': fileURLToPath(new URL('./src/api', import.meta.url)),
|
|
},
|
|
},
|
|
})
|