-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Closed
Labels
Description
Previously: #120.
Probably not going to happen any time soon, but at some point it would be nice to add support for code-splitting, i.e. finding the common dependencies of a.js
and b.js
so that you can do this sort of thing...
<!-- a.html -->
<script src='shared.js'></script>
<script src='a.js'></script>
<!-- b.html -->
<script src='shared.js'></script>
<script src='b.js'></script>
...and let visitors to b.html
who have already been to a.html
use a cached copy of shared.js
(mutatis mutandis for client-side routing situations with an asynchronous module loader).
First hard question is what the API looks like – my initial thought is that if you specify x entry points you should get x+1 bundles back, where the +1 is the shared code. Very easy to grok and probably meets most use cases, but not as flexible as some other approaches.
Anyway I'll just leave this here for now.
jmurzy, therealklanni, eknkc, ericf, piperswe and 88 more