Skip to content

Commit 652e137

Browse files
author
Luca Forstner
committed
Remove unnecessary optional regex
1 parent d050407 commit 652e137

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/nextjs/src/config/webpack.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ export function constructWebpackConfigFunction(
9595
// Nextjs allows the `pages` folder to optionally live inside a `src` folder
9696
test: new RegExp(
9797
`${escapeStringForRegex(projectDir)}${
98-
shouldIncludeSrcDirectory ? '(/src)?' : ''
98+
shouldIncludeSrcDirectory ? '/src' : ''
9999
}/pages/.*\\.(${pageExtensionRegex})`,
100100
),
101101
use: [

0 commit comments

Comments
 (0)