next.js
927749c6 - Strip `assetPrefix` when resolving external source maps of client chunks (#72258)

Commit
1 year ago
Strip `assetPrefix` when resolving external source maps of client chunks (#72258) When using Turbopack, and importing a server action into a client component, the source map for the client chunk will be requested if devtools are open. The filename for this source map request might be `/_next/static/chunks/[project]__800ed2._.js`, for example. This scenario was already handled by the dev middleware. However, it didn't consider that there might also be an `assetPrefix` defined in the `next.config.js`. In this case, the filename would be `/some-asset-prefix/_next/static/chunks/[project]__800ed2._.js`. When resolving the external source map for this file, we need to strip the asset prefix. Again, this can only be tested manually.
Author
Parents
Loading