next.js
b6fa6be4 - Handle URL-encoded Turbopack client chunks when resolving source maps (#71274)

Commit
1 year ago
Handle URL-encoded Turbopack client chunks when resolving source maps (#71274) When using Turbopack, after a client-side navigation, the source map for a client chunk might be requested using an URL-encoded pathname, e.g. `/_next/static/chunks/%5Bproject%5D__48591b._.js` instead of `/_next/static/chunks/[project]__48591b._.js`. When trying to look up the source map this would fail with: ``` Failed to get source map: [Error: chunk/module is missing a sourcemap] { code: 'GenericFailure' } ``` To fix this, we're now decoding the filename. ## Test Plan - start `pnpm next dev --turbo test/development/app-dir/source-mapping` - go to `http://localhost:3000` - click on "client component page" link - open React DevTools Components view - select `Form` - click on `bar()` action (requires version 6.0) - you should end up in the the `actions.ts` source file
Author
Parents
Loading