Webpack plugin to default all dynamic imports to eager-mode as a way to speed up non-production builds for large projects.
npm install eager-imports-webpack-pluginThis plugin takes inspiration from work done with @TheLarkInn on webpack #8644. It defaults all dynamic imports to eager mode, to relieve webpack of the expensive cost of having to determine what modules go into what emitted bundles.
Since that work (and webpack 5) are not yet released, this plugin is designed to deliver that same optimization to webpack v4.
``ts
import EagerImportsPlugin from 'eager-imports-webpack-plugin';
const webpackConfig = {
plugins: [
new EagerImportsPlugin(),
// other plugins ...
]
// other webpack config ...
}
``