-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnext.config.mjs
31 lines (29 loc) · 907 Bytes
/
next.config.mjs
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
/** @type {import('next').NextConfig} */
const nextConfig = {
webpack: (config) => {
config.module.rules.push({
test: /\.(?:js|ts)$/,
/*
* Undici includes private property syntax that doesn't play well with
* SWC. Since using babel-loader like this will slow down compilation,
* this rule scopes the config to only include the undici package.
* For more info see: https://github.com/nodejs/undici/issues/2954#issuecomment-2035743577
*/
include: [/node_modules\/(undici)/],
use: [
{
loader: "babel-loader",
options: {
presets: ["next/babel"],
plugins: [
"@babel/plugin-transform-private-property-in-object",
"@babel/plugin-transform-private-methods",
],
},
},
],
});
return config;
},
};
export default nextConfig;