Closed DmitryBrus closed 3 years ago
Just payed attention that I'm not at systemjs repo, worth to copy it to systemjs?
Let's track this in https://github.com/systemjs/systemjs/issues/2305. This was just implemented in ES module shims with dom mutators so the same approach can apply to SystemJS.
You were right that the real issue is whether the spec for dynamic map updates as per this repo has a chance of going forward!
I noticed weird behavior with dynamic-imports-maps extra.
let say we have 2 modules: mod1 and mod2.
import map for the first one pre-registered in index.html
Import map for second added dynamically:
this works good in straight sync flow:
But.
if dynamic add and import occurs asynchronously (e.g. after call or simply with setTimeout delay - import fails:
Unhandled Promise rejection: Unable to resolve bare specifier 'mod2'
if I wrap
System.import('mod2')
in setTimeout - import succeed, but it looks like workaround,Does anybody have any ideas why import behaves like that?
I use SystemJS 6.4.3