4 ms·
Wondering if an idea like this would work: Bundlers like Webpack already import JS in a modular structure. I'm wondering if we could do some profiling into pop
by chowes 10y ago
Wondering if an idea like this would work:
Bundlers like Webpack already import JS in a modular structure. I'm wondering if we could do some profiling into popular npm module combinations (I know many people using React + Lodash + Redux Router, etc), bundle them up, and have Webpack load in those combos from a CDN via <script>?
Now this would probably require some work on webpack's end (the __webpack_require__(n) would have to be some sort of consistent hash), but at least everyone who blindly require('lodash') will see an improvement?
- necessity 10y agoWeb pages shouldn't need JS at all, except for the basic eye candy it was originally used for, and most importantly shouldn't break without it. A web page that doesn't work without JS is broken. Web apps are another deal though.