add: example for tanstack start

This commit is contained in:
2026-02-11 21:41:26 +05:30
parent 6288faef33
commit 01483b912f
29 changed files with 905 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
import { defineConfig } from "vite";
import { devtools } from "@tanstack/devtools-vite";
import { tanstackStart } from "@tanstack/react-start/plugin/vite";
import viteReact from "@vitejs/plugin-react";
import viteTsConfigPaths from "vite-tsconfig-paths";
import { fileURLToPath, URL } from "url";
import tailwindcss from "@tailwindcss/vite";
import { nitro } from "nitro/vite";
const config = defineConfig({
resolve: {
alias: {
"@": fileURLToPath(new URL("./src", import.meta.url)),
},
},
plugins: [
nitro({ preset: "node-server" }),
tailwindcss(),
devtools(),
// this is the plugin that enables path aliases
viteTsConfigPaths({
projects: ["./tsconfig.json"],
}),
tanstackStart(),
viteReact({
babel: {
plugins: ["babel-plugin-react-compiler"],
},
}),
],
});
export default config;