-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext.config.mjs
More file actions
110 lines (106 loc) · 3.86 KB
/
next.config.mjs
File metadata and controls
110 lines (106 loc) · 3.86 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
/** @type {import('next').NextConfig} */
const nextConfig = {
productionBrowserSourceMaps: true,
cacheComponents: true,
reactCompiler: true,
experimental: {
multiZoneDraftMode: true,
appNavFailHandling: true,
prerenderEarlyExit: true,
preloadEntriesOnStart: true,
clientRouterFilter: true,
clientRouterFilterRedirects: true,
imgOptSequentialRead: true,
optimisticClientCache: true,
// DataCloneError
workerThreads: false,
optimizeCss: true,
nextScriptWorkers: true,
scrollRestoration: true,
externalDir: true,
/**
* Optimize React APIs for server builds.
*/
optimizeServerReact: true,
/**
* Runs the compilations for server and edge in parallel instead of in serial.
* This will make builds faster if there is enough server and edge functions
* in the application at the cost of more memory.
*
* NOTE: This option is only valid when the build process can use workers. See
* the documentation for `webpackBuildWorker` for more details.
*/
parallelServerCompiles: true,
/**
* Runs the logic to collect build traces for the server routes in parallel
* with other work during the compilation. This will increase the speed of
* the build at the cost of more memory. This option may incur some additional
* work compared to if the option was disabled since the work is started
* before data from the client compilation is available to potentially reduce
* the amount of code that needs to be traced. Despite that, this may still
* result in faster builds for some applications.
*
* Valid values are:
* - `true`: Collect the server build traces in parallel.
* - `false`: Do not collect the server build traces in parallel.
* - `undefined`: Collect server build traces in parallel only in the `experimental-compile` mode.
*
* NOTE: This option is only valid when the build process can use workers. See
* the documentation for `webpackBuildWorker` for more details.
*/
parallelServerBuildTraces: true,
/**
* Run the Webpack build in a separate process to optimize memory usage during build.
* Valid values are:
* - `false`: Disable the Webpack build worker
* - `true`: Enable the Webpack build worker
* - `undefined`: Enable the Webpack build worker only if the webpack config is not customized
*/
webpackBuildWorker: true,
/**
* Enables optimizations to reduce memory usage in Webpack. This reduces the max size of the heap
* but may increase compile times slightly.
* Valid values are:
* - `false`: Disable Webpack memory optimizations (default).
* - `true`: Enables Webpack memory optimizations.
*/
webpackMemoryOptimizations: true,
/**
* Enables experimental taint APIs in React.
* Using this feature will enable the `react@experimental` for the `app` directory.
*/
taint: true,
/**
* enables the minification of server code.
*/
serverMinification: true,
/**
* Enables source maps generation for the server production bundle.
*/
serverSourceMaps: true,
/**
* Use lightningcss instead of postcss-loader
*/
useLightningcss: false,
/**
* Enables `fetch` requests to be proxied to the experimental test proxy server
*/
testProxy: true,
/**
* Allows previously fetched data to be re-used when editing server components.
*/
serverComponentsHmrCache: true,
/**
* This config allows you to enable the experimental navigation API `forbidden` and `unauthorized`.
*/
authInterrupts: true,
/**
* Render <style> tags inline in the HTML for imported CSS assets.
* Supports app-router in production mode only.
*/
inlineCss: true,
//clientSegmentCache: true,
viewTransition: true,
},
};
export default nextConfig;