forked from zarif007/Open-Course
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.js
More file actions
35 lines (33 loc) · 765 Bytes
/
next.config.js
File metadata and controls
35 lines (33 loc) · 765 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
30
31
32
33
34
35
/** @type {import('next').NextConfig} */
const nextConfig = {
images: {
domains: ['i.ibb.co'],
},
experimental: {
serverActions: true,
serverActionsBodySizeLimit: '2mb',
},
webpack: (config, { isServer }) => {
if (!isServer) {
// Don't include undici in client-side bundles
config.resolve.fallback = {
...config.resolve.fallback,
undici: false,
};
} else {
// Transpile undici for server-side
config.module.rules.push({
test: /\.js$/,
include: /node_modules\/undici/,
use: {
loader: 'babel-loader',
options: {
presets: ['next/babel'],
},
},
});
}
return config;
},
};
module.exports = nextConfig;