Skip to content

Commit

Permalink
Don't error asking for prebuilt bundles (#71778)
Browse files Browse the repository at this point in the history
Turbopack doesn't recognize webpack:// and so errors otherwise.

We don't need source maps for internals.

<img width="774" alt="Screenshot 2024-10-23 at 10 13 02 PM"
src="https://github.com/user-attachments/assets/72ec2ecc-7fbb-4a2a-9978-8d8c365ab966">
  • Loading branch information
sebmarkbage authored Oct 24, 2024
1 parent ab1d9ee commit f5e5107
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,10 @@ export function getSourceMapMiddleware(project: Project, distDir: string) {
return badRequest(res)
}

if (filename.startsWith('webpack://next/')) {
return noContent(res)
}

try {
if (filename.startsWith('/_next/static')) {
filename = path.join(
Expand Down

0 comments on commit f5e5107

Please sign in to comment.