File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
packages/repl/src/lib/workers/bundler Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -185,7 +185,7 @@ async function get_bundle(
185185 const url = new URL ( importee , importer ) ;
186186
187187 for ( const suffix of [ '' , '.js' , '.json' ] ) {
188- const with_suffix = `${ url . pathname . slice ( 1 ) } ${ suffix } ` ;
188+ const with_suffix = `${ url . href . slice ( VIRTUAL . length + 1 ) } ${ suffix } ` ;
189189 const file = virtual . get ( with_suffix ) ;
190190
191191 if ( file ) {
@@ -202,7 +202,7 @@ async function get_bundle(
202202 const { name, version } = parse_npm_url ( importer ) ;
203203
204204 const pkg = await fetch_package ( name , name === 'svelte' ? svelte_version : version ) ;
205- const path = new URL ( importee , importer ) . pathname . replace ( `/${ name } @${ version } /` , '' ) ;
205+ const path = new URL ( importee , importer ) . href . replace ( `${ NPM } /${ name } @${ version } /` , '' ) ;
206206
207207 return normalize_path ( pkg , path ) ;
208208 }
You can’t perform that action at this time.
0 commit comments