From ec5e1f5447c7a2e6c5044630baa84d762645942e Mon Sep 17 00:00:00 2001 From: pieh Date: Mon, 26 Aug 2024 12:09:47 +0200 Subject: [PATCH] test: make middleware fixture produce chunked middleware --- tests/fixtures/middleware/next.config.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/fixtures/middleware/next.config.js b/tests/fixtures/middleware/next.config.js index 9d94510be1..28875fd694 100644 --- a/tests/fixtures/middleware/next.config.js +++ b/tests/fixtures/middleware/next.config.js @@ -4,6 +4,13 @@ const nextConfig = { eslint: { ignoreDuringBuilds: true, }, + webpack: (config) => { + // this is a trigger to generate multiple `.next/server/middleware-[hash].js` files instead of + // single `.next/server/middleware.js` file + config.optimization.splitChunks.maxSize = 100_000 + + return config + }, } module.exports = nextConfig