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?
Web 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.
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?