2026-07-26 23:21:33 +08:00
|
|
|
import path from "path"
|
|
|
|
|
import tailwindcss from "@tailwindcss/vite"
|
2026-07-29 21:23:17 +08:00
|
|
|
import { tanstackStart } from "@tanstack/react-start/plugin/vite"
|
|
|
|
|
import { i18n } from "@workspace/i18n/vite"
|
2026-07-26 23:21:33 +08:00
|
|
|
import react from "@vitejs/plugin-react"
|
2026-07-29 21:23:17 +08:00
|
|
|
import { nitro } from "nitro/vite"
|
2026-07-26 23:21:33 +08:00
|
|
|
import { defineConfig } from "vite"
|
|
|
|
|
|
|
|
|
|
// https://vite.dev/config/
|
|
|
|
|
export default defineConfig({
|
|
|
|
|
resolve: {
|
2026-07-29 21:23:17 +08:00
|
|
|
tsconfigPaths: true,
|
2026-07-26 23:21:33 +08:00
|
|
|
alias: {
|
|
|
|
|
"@": path.resolve(__dirname, "./src"),
|
|
|
|
|
},
|
|
|
|
|
},
|
2026-07-29 21:23:17 +08:00
|
|
|
optimizeDeps: {
|
|
|
|
|
include: ["use-sync-external-store/shim/with-selector"],
|
|
|
|
|
},
|
|
|
|
|
plugins: [
|
|
|
|
|
i18n(),
|
|
|
|
|
tailwindcss(),
|
|
|
|
|
tanstackStart({
|
|
|
|
|
router: {
|
|
|
|
|
generatedRouteTree: "route-tree.gen.ts",
|
|
|
|
|
},
|
|
|
|
|
srcDirectory: "src",
|
|
|
|
|
}),
|
|
|
|
|
react(),
|
|
|
|
|
nitro(),
|
|
|
|
|
],
|
|
|
|
|
server: {
|
|
|
|
|
host: "0.0.0.0",
|
|
|
|
|
port: 31573,
|
|
|
|
|
},
|
2026-07-26 23:21:33 +08:00
|
|
|
})
|