@@ -12,7 +12,10 @@ import type { Module } from './entities/module';
1212import TranspiledModule from './transpiled-module' ;
1313import type { SerializedTranspiledModule } from './transpiled-module' ;
1414import Preset from './presets' ;
15- import fetchModule , { getCombinedMetas } from './npm/fetch-npm-module' ;
15+ import fetchModule , {
16+ getCombinedMetas ,
17+ setCombinedMetas ,
18+ } from './npm/fetch-npm-module' ;
1619import coreLibraries from './npm/get-core-libraries' ;
1720import getDependencyName from './utils/get-dependency-name' ;
1821import DependencyNotFoundError from '../errors/dependency-not-found-error' ;
@@ -422,7 +425,7 @@ export default class Manager {
422425 const aliasedPath = this . getAliasedDependencyPath ( path , currentPath ) ;
423426 const shimmedPath = coreLibraries [ aliasedPath ] || aliasedPath ;
424427
425- const pathId = path + currentPath ;
428+ const pathId = shimmedPath + currentPath ;
426429 const cachedPath = this . cachedPaths [ pathId ] ;
427430 try {
428431 let resolvedPath ;
@@ -706,6 +709,7 @@ export default class Manager {
706709 cachedPaths : this . cachedPaths ,
707710 version : VERSION ,
708711 configurations : this . configurations ,
712+ meta : getCombinedMetas ( ) ,
709713 dependenciesQuery ,
710714 } ;
711715 }
@@ -750,12 +754,14 @@ export default class Manager {
750754 version,
751755 configurations,
752756 dependenciesQuery,
757+ meta,
753758 } : {
754759 transpiledModules : { [ id : string ] : SerializedTranspiledModule } ,
755760 cachedPaths : { [ path : string ] : string } ,
756761 version : string ,
757762 configurations : Object ,
758763 dependenciesQuery : string ,
764+ meta : any ,
759765 } = data ;
760766
761767 // Only use the cache if the cached version was cached with the same
@@ -764,6 +770,8 @@ export default class Manager {
764770 version === VERSION &&
765771 dependenciesQuery === this . getDependencyQuery ( )
766772 ) {
773+ setCombinedMetas ( meta ) ;
774+
767775 this . cachedPaths = cachedPaths ;
768776 this . configurations = configurations ;
769777
0 commit comments