cramforce / splittable

Module bundler with support for code splitting, ES6 & CommonJS modules.
Apache License 2.0
945 stars 34 forks source link

Progressive loading #5

Closed matthewp closed 7 years ago

matthewp commented 7 years ago

It's not clear from the code or article if the supports progressive loading via require.ensure or System.import or something else. Would be good to add that to the readme, I think. Cool project!

matthewp commented 7 years ago

Maybe, to answer my own question, is that you would have a new entry for the lazy-loaded code and dynamically inject a <script> to load it.

cramforce commented 7 years ago

Right. Simple to wrap in a JS loader similar to require.ensure. But not quite the same. The caller cannot get access to module object without additional code. Might be worth adding that boilerplate by default.

On Nov 17, 2016 9:06 AM, "Matthew Phillips" notifications@github.com wrote:

Maybe, to answer my own question, is that you would have a new entry for the lazy-loaded code and dynamically inject a Githubissues.

  • Githubissues is a development platform for aggregating issues.