File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -149,7 +149,7 @@ export function createNpmFileSystem(
149149 if ( ( await _stat ( path ) ) ?. type !== 1 satisfies FileType . File ) {
150150 return ;
151151 }
152- const text = await fetchText ( `https://cdn.jsdelivr.net/npm/${ path } ` ) ;
152+ const text = await fetchText ( `https://cdn.jsdelivr.net/npm/${ pkgName } @ ${ _version || 'latest' } / ${ pkgFilePath } ` ) ;
153153 if ( text !== undefined ) {
154154 onFetch ?.( path , text ) ;
155155 }
@@ -251,7 +251,7 @@ export function createNpmFileSystem(
251251 version = modName . substring ( modName . lastIndexOf ( '@' ) + 1 ) ;
252252 }
253253 if ( ! version && getPackageVersion ) {
254- getPackageVersion ?.( pkgName ) ;
254+ version = getPackageVersion ?.( pkgName ) ;
255255 }
256256 return [ modName , pkgName , version , path ] ;
257257 }
You can’t perform that action at this time.
0 commit comments