Turbopack: Strip relative path prefix when generating PageLoaderAsset (#54040)
### What? Strip the relative path prefix (`_next/`) when generating the `PageLoaderAsset`. This is necessary because the page loader will internally use `__turbopack_load__`, which prepends the prefix back onto the path. ### Why? Without this, we'd try loading `_next/_next/path/to/file.js`, because we'd prepend the prefix onto a path that already contains it. ### How? When generating the page loader asset, we "proxy" the `OutputAsset` onto a path which has the prefix removed. ~~Depends on https://github.com/vercel/turbo/pull/5717~~ Closes WEB-1377
Showing
This diff is collapsed.
Please
register
or
sign in
to comment