-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvite.config.ts
34 lines (32 loc) · 964 Bytes
/
vite.config.ts
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
30
31
32
33
34
/// <reference types="vitest" />
import { TanStackRouterVite } from "@tanstack/router-vite-plugin";
import react from "@vitejs/plugin-react";
import { defineConfig } from "vite";
import { nodePolyfills } from "vite-plugin-node-polyfills";
import tsconfigPaths from "vite-tsconfig-paths";
// https://vitejs.dev/config https://vitest.dev/config
export default defineConfig({
build: {
// target esnext is needed for top-level await support
target: "esnext",
},
plugins: [
react({
jsxImportSource:
// eslint-disable-next-line turbo/no-undeclared-env-vars
process.env.NODE_ENV === "development"
? "@welldone-software/why-did-you-render"
: "react",
}),
tsconfigPaths(),
TanStackRouterVite({ routesDirectory: "./src/ui/routes" }),
nodePolyfills({
exclude: ["fs"],
globals: {
process: true,
},
protocolImports: false,
}),
],
publicDir: "src/public",
});