Skip to content

Commit

Permalink
Merge branch 'canary' into fix/next/build-output-formatAmpMessages-wi…
Browse files Browse the repository at this point in the history
…thout-message
  • Loading branch information
Timer authored Oct 30, 2019
2 parents fc4e2da + 5f203b8 commit d3725a3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions packages/next/build/webpack-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,15 @@ export default async function getBaseWebpackConfig(
return callback()
}

// Relative requires don't need custom resolution, because they
// are relative to requests we've already resolved here.
// Absolute requires (require('/foo')) are extremely uncommon, but
// also have no need for customization as they're already resolved.
const start = request.charAt(0);
if (start === '.' || start === '/') {
return callback();
}

// Resolve the import with the webpack provided context, this
// ensures we're resolving the correct version when multiple
// exist.
Expand Down

0 comments on commit d3725a3

Please sign in to comment.