3 ms·
What are "standard modules" for modern browser? I don't typically frontend dev these days, so I'm likely a bit out of the loop. The way I typically thought of
by asdkhadsj 8y ago
What are "standard modules" for modern browser? I don't typically frontend dev these days, so I'm likely a bit out of the loop.
The way I typically thought of dependencies with browsers was to bundle them all together. Is there some new solution to this problem?
- sephware 8y agoThey’re still mainly bundlers for now, such as webpack. But browsers are slowly adopting first class modules which has already been solidified by the spec afaik.
- mhd 8y agoProbably using the ES2015 import syntax[1], which allows you to dynamically load modules. I have my doubts whether your average medium+ sized JS app will be that dynamically, so you'll probably end up slurping a whole lot o' module at startup. And without tree-shaking, more stuff to download and digest. [1]https://caniuse.com/#feat=es6-module-dynamic-import https://caniuse.com/#feat=es6-module-dynamic-import
- spankalee 8y agoYou can bundle modules together so you don't have a ton of downloads, but the basic module graph will at least be loadable. WebPackaging will also help in the future.