-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
29 lines (28 loc) · 857 Bytes
/
vite.config.ts
File metadata and controls
29 lines (28 loc) · 857 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import tailwindcss from "@tailwindcss/vite";
import { tanstackStart } from "@tanstack/react-start/plugin/vite";
import viteReact from "@vitejs/plugin-react";
import { defineConfig } from "vite";
export default defineConfig({
server: {
port: 4000,
},
resolve: {
tsconfigPaths: true,
},
ssr: {
// rrule v2 ships an ESM build whose internal imports are extensionless
// (`import './rrule'` instead of `import './rrule.js'`), which Node's
// native ESM resolver (used by TanStack Start's SSR path) rejects.
// Forcing Vite to bundle rrule for SSR runs its interop and fixes the
// extensionless imports. Same concept as `optimizeDeps.include` but for
// the server bundle.
noExternal: ["rrule"],
},
plugins: [
tailwindcss(),
tanstackStart({
srcDirectory: "src",
}),
viteReact(),
],
});