Webpack LRU middleware
Stop building entrypoints you don't need!
Webpack configurations with a lot of entrypoints will often build a lot of unnecessary modules, taking up valuable build time.
This module is a wrapper around webpack-dev-middleware, replacing the webpack entry with a cache and mounting entrypoints as they are requested.
- Specify a set of entrypoints on startup
- Build more entrypoints based on trigger requests
- Limit number of active entrypoints to build
- Remove entrypoints when they have not been used for a while
Table of contents
npm install webpack-lru-middleware --save-dev
const webpack = ;const webpackDevMiddleware = ;const webpackLRU = ;const lru =;// Pass a modified webpack config with LRU entries to webpack:const compiler = ;const middleware = ;// Wrap and mount the middlewares:app;