diff --git a/lively.modules/src/packages/package-registry.js b/lively.modules/src/packages/package-registry.js index 7619e7e156..0f1855c726 100644 --- a/lively.modules/src/packages/package-registry.js +++ b/lively.modules/src/packages/package-registry.js @@ -273,7 +273,6 @@ export class PackageRegistry { findPackageHavingURL (url) { // does url identify a resource inside pkg, maybe pkg.url === url? if (url.isResource) url = url.url; - if (url.startsWith('esm://')) return null; if (url.endsWith('/')) url = url.slice(0, -1); if (this.moduleUrlToPkg.has(url)) return this.moduleUrlToPkg.get(url); let penaltySoFar = Infinity; let found = null; let { byURL } = this; @@ -454,7 +453,7 @@ export class PackageRegistry { let pkg = (existingPackageMap && existingPackageMap[url]) || new Package(this.System, url); let config = await pkg.tryToLoadPackageConfig(); - if (url.includes('local_projects')){ + if (url.includes('local_projects')) { const forkInfoFile = resource(url).join('.livelyForkInformation'); if ((await forkInfoFile.exists())) { const forkInfo = JSON.parse((await forkInfoFile.read())); diff --git a/lively.modules/src/system.js b/lively.modules/src/system.js index fdfff602f6..82dcf1b1d3 100644 --- a/lively.modules/src/system.js +++ b/lively.modules/src/system.js @@ -538,7 +538,7 @@ async function normalizeHook (proceed, name, parent, parentAddress) { const indexjs = stage3.replace('.js', '/index.js'); if (await checkExistence(indexjs, System) || !isNodePath) return indexjs; return stage3.replace('.js', '/index.node'); - } else if (!stage3.includes('jspm.dev') && stage3 !== '@empty') { + } else if (!stage3.startsWith('esm://') && !stage3.includes('jspm.dev') && stage3 !== '@empty') { if (await checkExistence(stage3 + '.js', System)) return stage3 + '.js'; if (await checkExistence(stage3 + '/index.js', System)) return stage3 + '/index.js'; }