From d031cf64df61138afad2f2582b4daf93f8937042 Mon Sep 17 00:00:00 2001 From: Joe Haddad Date: Sat, 14 Sep 2019 17:41:05 -0400 Subject: [PATCH] Ensure requests are resolved as directories (#8742) * Ensure requests are resolved as directories `resolveRequest` will strip down to baseDir if there's no trailing slash as it assumes you passed a file. * Disable telemetry for PR Stats --- packages/next/build/webpack-config.ts | 4 ++-- test/.stats-app/stats-config.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/next/build/webpack-config.ts b/packages/next/build/webpack-config.ts index a5a7e7b66bede..ebe686236d7be 100644 --- a/packages/next/build/webpack-config.ts +++ b/packages/next/build/webpack-config.ts @@ -319,7 +319,7 @@ export default async function getBaseWebpackConfig( // exist. let res try { - res = resolveRequest(request, context) + res = resolveRequest(request, `${context}/`) } catch (err) { // This is a special case for the Next.js data experiment. This // will be removed in the future. @@ -354,7 +354,7 @@ export default async function getBaseWebpackConfig( // we need to bundle the code (even if it _should_ be external). let baseRes try { - baseRes = resolveRequest(request, dir) + baseRes = resolveRequest(request, `${dir}/`) } catch (err) {} // Same as above: if the package, when required from the root, diff --git a/test/.stats-app/stats-config.js b/test/.stats-app/stats-config.js index 6001ca233d353..46800a804bed8 100644 --- a/test/.stats-app/stats-config.js +++ b/test/.stats-app/stats-config.js @@ -75,8 +75,8 @@ const renames = [ module.exports = { commentHeading: 'Stats from current PR', commentReleaseHeading: 'Stats from current release', - appBuildCommand: 'yarn next build', - appStartCommand: 'yarn next start --port $PORT', + appBuildCommand: 'NEXT_TELEMETRY_DISABLED=1 yarn next build', + appStartCommand: 'NEXT_TELEMETRY_DISABLED=1 yarn next start --port $PORT', mainRepo: 'zeit/next.js', mainBranch: 'canary', autoMergeMain: true,