-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.js
38 lines (35 loc) · 1.02 KB
/
next.config.js
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
const {
withHydrationOverlay,
} = require("@builder.io/react-hydration-overlay/next");
const million = require("million/compiler");
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
typescript: {
ignoreBuildErrors: true,
},
eslint: {
ignoreDuringBuilds: true,
},
images: {
domains: ["cdn.builder.io", "media.licdn.com"],
},
};
const millionConfig = {
auto: {
threshold: 0.05, // default: 0.1,
skip: ["useBadHook", /badVariable/g], // default []
// if you're using RSC: auto: { rsc: true },
},
};
if (process.env.NODE_ENV === "development") {
module.exports = withHydrationOverlay({
/**
* Optional: `appRootSelector` is the selector for the root element of your app. By default, it is `#__next` which works
* for Next.js apps with pages directory. If you are using the app directory, you should change this to `main`.
*/
appRootSelector: "main",
})(nextConfig);
} else {
module.exports = million.next(nextConfig, millionConfig);
}