From 7cb00b841f97c87823e664b03f989799a8f2d8b7 Mon Sep 17 00:00:00 2001 From: Tim Neutkens Date: Thu, 13 May 2021 19:14:29 +0200 Subject: [PATCH 1/2] Remove leftover babel include regex (#25101) This regex is no longer needed since it no longer matches with the strip-ansi version that is bundled with Next.js ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added ## Feature - [ ] Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Documentation added - [ ] Telemetry added. In case of a feature if it's used or not. ## Documentation / Examples - [ ] Make sure the linting passes --- packages/next/build/webpack-config.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/next/build/webpack-config.ts b/packages/next/build/webpack-config.ts index 438796298254a..4050a470e4b88 100644 --- a/packages/next/build/webpack-config.ts +++ b/packages/next/build/webpack-config.ts @@ -287,7 +287,6 @@ export default async function getBaseWebpackConfig( /next[\\/]dist[\\/]next-server[\\/]lib/, /next[\\/]dist[\\/]client/, /next[\\/]dist[\\/]pages/, - /[\\/](strip-ansi|ansi-regex)[\\/]/, ] // Support for NODE_PATH From 22e3f8c2e702cad559f0d2e593102a47c5faffe2 Mon Sep 17 00:00:00 2001 From: JJ Kasper Date: Thu, 13 May 2021 13:32:46 -0500 Subject: [PATCH 2/2] docs(rewrites.md): update beforeFiles note (#25113) This updates the beforeFiles rewrites note to mention the rewrites can affect `_next` files which are required for loading pages client-side. ## Documentation / Examples - [x] Make sure the linting passes --- docs/api-reference/next.config.js/rewrites.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/api-reference/next.config.js/rewrites.md b/docs/api-reference/next.config.js/rewrites.md index 03d2fa9436514..927fc23778c27 100644 --- a/docs/api-reference/next.config.js/rewrites.md +++ b/docs/api-reference/next.config.js/rewrites.md @@ -58,8 +58,8 @@ module.exports = { return { beforeFiles: [ // These rewrites are checked after headers/redirects - // and before pages/public files which allows overriding - // page files + // and before all files including _next/public files which + // allows overriding page files { source: '/some-page', destination: '/somewhere-else',