hard-source-webpack-plugin
hard-source-webpack-plugin copied to clipboard
https://github.com/mzgoddard/hard-source-webpack-plugin/issues/461#issuecomment-439177290
https://github.com/mzgoddard/hard-source-webpack-plugin/issues/461#issuecomment-439177290 When I use this solution to solve the problem, it's an escape behavior to make other loaders work。
plugin:[
new HardSourceWebpackPlugin(),
new HardSourceWebpackPlugin.ExcludeModulePlugin({
// HardSource works with mini-css-extract-plugin but due to how
// mini-css emits assets, assets are not emitted on repeated builds with
// mini-css and hard-source together. Ignoring the mini-css loader
// modules, but not the other css loader modules, excludes the modules
// that mini-css needs rebuilt to output assets every time.
test: /mini-css-extract-plugin[\\/]dist[\\/]loader/
})
]
Originally posted by @dazjean in https://github.com/mzgoddard/hard-source-webpack-plugin/issues/416#issuecomment-841059306