-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
Given two modules that both import lit, this approach works fine:
new ModuleLoader(...);
for (const mod of modules) {
await loader.importModule(module, referrer);
}But this approach consistently fails:
new ModuleLoader(...);
await Promise.all(modules.map((module) =>
loader.importModule(module, referrer));
);with an error like:
Error: request for '@lit/reactive-element' is not yet fulfilled
at SourceTextModule.link (node:internal/vm/module:198:17)
at ModuleLoader.importModule (/home/aomarks/work/wireit-lit/packages/labs/ssr/src/lib/module-loader.ts:107:7)
at async Promise.all (index 1)
at AsyncEventEmitter.<anonymous> (/home/aomarks/work/wireit-lit/packages/labs/eleventy-plugin-lit/src/index.ts:85:7)
at async Promise.all (index 0)
at async Eleventy.executeBuild (/home/aomarks/work/wireit-lit/packages/labs/eleventy-plugin-lit/node_modules/@11ty/eleventy/src/Eleventy.js:971:7)
Decent chance there is a timing issue in the ModuleLoader class
| export class ModuleLoader { |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
✅ Done