3 ms·
We're using Webpack, which is similar to Browserify (in the context of this article) but also provides lazy-loading and automatically generated bundles dependin
by grrowl 12y ago
We're using Webpack, which is similar to Browserify (in the context of this article) but also provides lazy-loading and automatically generated bundles depending on how your code is structured.
At the moment, our "app.js" bundle includes the core. As components are requested (in the form of define(['newsfeed'], function(newsfeed) { newsfeed.render(); });), the requested bundle is downloaded and includes all of its dependencies, including pre-compiled SCSS styles in-line and excluding components/libraries used commonly across the application.
This happens using static analysis of your code and is fairly transparent to the developer.