-
Notifications
You must be signed in to change notification settings - Fork 1
/
next.config.js
39 lines (36 loc) · 846 Bytes
/
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
39
/** @type {import('next').NextConfig} */
const nextConfig = {
experimental: {
largePageDataBytes: 128 * 100000,
},
async rewrites() {
return {
fallback: [
// These rewrites are checked after both pages/public files
// and dynamic routes are checked
{
source: '/api/:api*',
destination: `${process.env.baseURL}/api/:api*`,
},
],
}
},
reactStrictMode: false,
webpack: (
config,
{ buildId, dev, isServer, defaultLoaders, nextRuntime, webpack }
) => {
// Important: return the modified config
config.module.rules.push(
{
test: /\.m?js$/,
resolve: {
// 关闭fullySpecified
fullySpecified: false, // disable the behaviour
},
}
)
return config
},
}
module.exports = nextConfig