27 lines
731 B
TypeScript
27 lines
731 B
TypeScript
import tailwindcss from "@tailwindcss/vite";
|
|
import { tanstackStart } from "@tanstack/react-start/plugin/vite";
|
|
import viteReact from "@vitejs/plugin-react";
|
|
import { nitro } from "nitro/vite";
|
|
import { defineConfig } from "vite";
|
|
import tsConfigPaths from "vite-tsconfig-paths";
|
|
import path from "path";
|
|
|
|
export default defineConfig({
|
|
server: {
|
|
port: 3000,
|
|
},
|
|
plugins: [
|
|
tsConfigPaths(),
|
|
tanstackStart(),
|
|
process.env.NITRO === "1" ? nitro({ preset: "bun" }) : null,
|
|
// react's vite plugin must come after start's vite plugin
|
|
viteReact(),
|
|
tailwindcss(),
|
|
],
|
|
resolve: {
|
|
alias: {
|
|
"@": path.resolve(__dirname, "./src"),
|
|
"@db": path.resolve(__dirname, "./database")
|
|
},
|
|
}
|
|
});
|