Are ES6 modules in browsers going to get loaded level-by-level?
joe at trusktr.io
Mon Oct 12 19:58:50 UTC 2020
I'm asking about a server that, upon request of a `.js` file, knows
how to enumerate the dependency tree based on that file, _then_ HTTP
pushes all the modules at once.
So basically, from the code
<script type=module src="./path/to/module.js">
the client knows it should request `./path/to/module.js`, but it does
not know what modules that `./path/to/module.js` will want to import
because the source code has not yet arrived.
So what I am imagining is the server receives the request for
`./path/to/module.js`, _and_ it enumerates the dependencies of
`./path/to/module.js` and also pushes those.
If I understand HTTP/2 correctly, this requires more than a server
that simply has HTTP push, it requires a server that understands how
to read ES modules and enumerate their dependencies.
So what I wondering is if there are any servers that do that.
On Sun, Oct 11, 2020 at 1:26 PM Isiah Meadows <contact at isiahmeadows.com> wrote:
> Have you actually tried to test it? HTTP Push is more a server thing than a browser thing.
> Isiah Meadows
> contact at isiahmeadows.com
> On Sat, Oct 10, 2020 at 5:51 PM #!/JoePea <joe at trusktr.io> wrote:
>> It's 5 years later, but still no (obvious) sign of HTTP/2 servers specialized in ES Module push.
>> Do any exist? Anyone have a list? I'm especially interested in the self-hostable servers, but also curious about solutions where we may publish modules to.
>> The non-self-hosted solutions may be attractive to those people who normally publish static sites and need to publish ES Modules as static resources somewhere without the fuss if managing a server.
>> es-discuss mailing list
>> es-discuss at mozilla.org
More information about the es-discuss