We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 572a5d7 commit 4758a9dCopy full SHA for 4758a9d
packages/nextjs/src/config/webpack.ts
@@ -56,6 +56,8 @@ export function constructWebpackConfigFunction(
56
57
if (runtime !== 'client') {
58
warnAboutDeprecatedConfigFiles(projectDir, runtime);
59
+ }
60
+ if (runtime === 'server') {
61
warnAboutMissingonRequestErrorHandler(projectDir);
62
}
63
@@ -462,7 +464,7 @@ function warnAboutMissingonRequestErrorHandler(projectDir: string): void {
462
464
function hasOnRequestErrorHandler(absolutePath: string): boolean {
463
465
try {
466
const content = fs.readFileSync(absolutePath, 'utf8');
- return content.includes('export const onRequestError');
467
+ return content.includes('onRequestError');
468
} catch (error) {
469
return false;
470
0 commit comments