Open unscriptable opened 10 years ago
The ES6 loader will not support circular dependencies in anything but ES6 modules. The proposed way to handle this is with a separate registry (cache) for ES5 modules (AMD, node), bypassing the ES6 instantiate
hook's dependency fetching feature.
There's a silver lining here! Keeping our own registry allows us to avoid having to transform ES5 modules to ES6 and back again when they are passed through the ES6 loader! This improves performance and removes ugly hacks!! Woohoo!
Guy Bedford has an alternate proposal that would eliminate the side registry. I'm waiting to see if his proposal gains any traction.
According to this js-loaders issue, we need to manage our own ES5 modules with a separate module registry.