hmr-filter-webpack-plugin
v1.0.0 HotModuleReplacement webpack plugin filter
hmr-filter-webpack-plugin
Disable Hot Module Replacement for certain chunks.
Install
npm i -D hmr-filter-webpack-plugin
# or
yarn add -D hmr-filter-webpack-plugin
Usage
// webpack.config.js
const {
HotModuleReplacementFilterPlugin
} = require('hmr-filter-webpack-plugin');
// ...
{
plugins: [
// Disable HMR for `worker-loader` and `service-worker-loader`
new HotModuleReplacementFilterPlugin((compilation) => {
const {
name
} = compilation.compiler;
return name && name.includes('worker');
}),
new webpack.HotModuleReplacementPlugin()
]
}
npm i hmr-filter-webpack-plugin
Source Code
github.com/TrigenSoftware/hm...Metadata
- MIT
- >=8.0.0
- dangreen
- released 8/30/2019