Possibly a dangerous thing to add as a runtime feature then, if it's going to encourage bad loading practices?
-
-
-
I think it's not bad for cases that approximate today's script tags, and I think a lot of small sites will use it this way (and benefit, big time). But I don't think we're gonna see sites with thousands of modules running natively any time soon.
-
And I also think that coming to terms with that is good for modules on the web.
End of conversation
New conversation -
-
-
100% agree and been saying this for a while. Making authoring and delivery the same concern isn't even desirable. Much better to optimize them separately.
-
What is needed is an interop primitive. E.g. a way for bundled code to expose a module interface.
-
Ding ding ding. Having this stuff be bound up in proprietary chunk loaders is bad. We need something like the dlopen interface in the C ABI.
- 1 more reply
New conversation -
-
-
How important do you think it is for these linker tools to obey the spec? Can observable behaviour differ between the optimized and raw code once loaded by the browser?
-
Very very important
End of conversation
New conversation -
-
-
Could there be a way forward for a standardised bundling format?
-
I think that would be premature because static vs dynamic linking is still something userspace needs to sort out. (we need both)
End of conversation
New conversation -
-
-
HTTP2 and/or link prefetch is supposed to help the runtime aspect, right?
-
I don't think so.
-
Supposed to, yes, but in practice its still not enough. A Googler (
@samccone?) discussed this in some detail at the most recent Chrome Dev Dummit -
Still plenty of overhead at browser side for handling many individual requests. In our tests, h2 starts slowing down considerably from 50+ requests onwards.
- End of conversation
New conversation -
-
-
Disagree. It allows splitting a big app gracefully. Why would you load 400KB JS to all the users if 150 is enough for 90% of them? It can be done without module but it's much heavier and annoying then.
-
It can be done? Code splitting is very simple, it‘s just an Import(...) Statement on the fly. And things like tree shaking or putting common chunks into separate bundles make a huge difference.
-
Sure but all of that is made easier with ES2015 modules. Same for WebAssembly when they will be possible to load through modules on the browser (which I hope will happen soon, anyway it's on the roadmap).
-
That's what people are saying here, it isn't exactly easier, that's why the community at large is opting out. There are few benefits over bundling and scores of disadvantages atm. I'm sure they'll be flattened out, but we're far from a workable solution right now.
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.