File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
tests/fixtures/middleware Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,11 @@ const nextConfig = {
1111 webpack : ( config ) => {
1212 // this is a trigger to generate multiple `.next/server/middleware-[hash].js` files instead of
1313 // single `.next/server/middleware.js` file
14- // this doesn't seem to actually work with Node Middleware - it result in next build failures
15- // config.optimization.splitChunks.maxSize = 100_000
14+ if ( process . env . SPLIT_CHUNKS ) {
15+ // this doesn't seem to actually work with Node Middleware - it result in next build failures
16+ // so we only do this for default/Edge Runtime
17+ config . optimization . splitChunks . maxSize = 100_000
18+ }
1619
1720 return config
1821 } ,
Original file line number Diff line number Diff line change 11{
2+ "default" : {
3+ "env" : {
4+ "SPLIT_CHUNKS" : " true"
5+ }
6+ },
27 "node-middleware" : {
38 "distDir" : " .next-node-middleware" ,
49 "files" : {
You can’t perform that action at this time.
0 commit comments