mirror of https://github.com/status-im/metro.git
1e8e4dc223
Summary: public Introduce a new Polyfill module to load bundles. This polyfill contains the function to which System.import gets transformed into. It works similarly to require in the way it's registered. It keeps track of the bundles that have ever been requested using promises, either fulfilled or not. The use of promises makes the implementation quite easy as we don't need to differenciate whether the request has been started or not. There're a couple of follow up steps that still need to get done: - Included this polyfill on the ones we automatically include on the bundle. - Modify the transform to include the modules the user is actually requesting and pipe that through loadBundles so that the promise, once resolved, has the ordered list of modules the user requested. - Implement the actual native code that loads a bundle. This shouldn't be that taught as native will be able to assume it will never receive the same request twice. Reviewed By: davidaurelio Differential Revision: D2727241 fb-gh-sync-id: 317d80754783caf43f10c71a34a4558a4d298d45 |
||
---|---|---|
.. | ||
__mocks__ | ||
src | ||
.babelrc | ||
.npmignore | ||
index.js |