-
Notifications
You must be signed in to change notification settings - Fork 559
Expand file tree
/
Copy pathnext.config.ts
More file actions
47 lines (43 loc) · 1.11 KB
/
Copy pathnext.config.ts
File metadata and controls
47 lines (43 loc) · 1.11 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
/**
* Run `build` or `dev` with `SKIP_ENV_VALIDATION` to skip env validation. This is especially useful
* for Docker builds.
*/
import type { NextConfig } from "next";
import { DEFAULT_STYLE_ID } from "./src/lib/constants";
import "./src/env.js";
const nextConfig: NextConfig = {
cacheComponents: true,
async redirects() {
return [
{
source: "/docs/components/:name((?!radix|base)[^/]+)",
destination: "/docs/components/base/:name",
permanent: false,
},
];
},
async rewrites() {
return [
{
source: "/r/:style/:name.json",
destination: "/r/styles/:style/:name.json",
},
{
source: "/r/:name.json",
destination: `/r/styles/${DEFAULT_STYLE_ID}/:name.json`,
},
];
},
// Already doing typechecking as separate task in CI
typescript: { ignoreBuildErrors: true },
experimental: {
optimizePackageImports: [
"@tanstack/query-db-collection",
"@tanstack/react-db",
"@tanstack/react-query",
"@tanstack/react-table",
"@tanstack/react-virtual",
],
},
};
export default nextConfig;