We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5ca68b4 commit 54858b4Copy full SHA for 54858b4
turbopack/crates/turbopack-ecmascript-runtime/js/src/browser/runtime/base/runtime-base.ts
@@ -377,9 +377,12 @@ function getPathFromScript(
377
: chunkScript.getAttribute('src')!
378
const src = decodeURIComponent(chunkUrl.replace(/[?#].*$/, ''))
379
const runtimeBasePath = getRuntimeChunkBasePath()
380
- const path = src.startsWith(runtimeBasePath)
+ let path = src.startsWith(runtimeBasePath)
381
? src.slice(runtimeBasePath.length)
382
: src
383
+ if (path.startsWith('/')) {
384
+ path = path.slice(1)
385
+ }
386
return path as ChunkPath | ChunkListPath
387
}
388
0 commit comments