refactor(server): 改用 Vite 原生 tsconfig 路径解析

This commit is contained in:
2026-03-22 01:05:16 +08:00
parent 4e2bc5b8dc
commit 88326c4992
4 changed files with 4 additions and 13 deletions

View File

@@ -54,7 +54,6 @@
"drizzle-kit": "catalog:",
"nitro": "catalog:",
"tailwindcss": "catalog:",
"vite": "catalog:",
"vite-tsconfig-paths": "catalog:"
"vite": "catalog:"
}
}

View File

@@ -4,14 +4,12 @@ import { tanstackStart } from '@tanstack/react-start/plugin/vite'
import react from '@vitejs/plugin-react'
import { nitro } from 'nitro/vite'
import { defineConfig } from 'vite'
import tsconfigPaths from 'vite-tsconfig-paths'
export default defineConfig({
clearScreen: false,
plugins: [
tanstackDevtools(),
tailwindcss(),
tsconfigPaths(),
tanstackStart(),
react({
babel: {
@@ -23,6 +21,9 @@ export default defineConfig({
serveStatic: 'inline',
}),
],
resolve: {
tsconfigPaths: true,
},
server: {
port: 3000,
strictPort: true,