Skip to content

Commit 4758a9d

Browse files
committed
review items
1 parent 572a5d7 commit 4758a9d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/nextjs/src/config/webpack.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ export function constructWebpackConfigFunction(
5656

5757
if (runtime !== 'client') {
5858
warnAboutDeprecatedConfigFiles(projectDir, runtime);
59+
}
60+
if (runtime === 'server') {
5961
warnAboutMissingonRequestErrorHandler(projectDir);
6062
}
6163

@@ -462,7 +464,7 @@ function warnAboutMissingonRequestErrorHandler(projectDir: string): void {
462464
function hasOnRequestErrorHandler(absolutePath: string): boolean {
463465
try {
464466
const content = fs.readFileSync(absolutePath, 'utf8');
465-
return content.includes('export const onRequestError');
467+
return content.includes('onRequestError');
466468
} catch (error) {
467469
return false;
468470
}

0 commit comments

Comments
 (0)