Skip to content

Commit

Permalink
Ensure requests are resolved as directories (#8742)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Timer authored Sep 14, 2019
1 parent cbd427b commit d031cf6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/next/build/webpack-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions test/.stats-app/stats-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit d031cf6

Please sign in to comment.