Plugins Module
const { plugins } = require( '@humanmade/webpack-helpers' );
This module provides methods which create new instances of commonly-needed Webpack plugins.
Plugin | Description | |
---|---|---|
plugins.bundleAnalyzer() | Create and return a new webpack-bundle-analyzer instance. When included this plugin is disabled by default unless the --analyze flag is passed on the command line. | |
plugins.clean() | Create and return a new clean-webpack-plugin instance. | |
plugins.copy() | Create and return a new copy-webpack-plugin instance. | |
plugins.errorBell() | Create and return a new bell-on-bundle-error-plugin instance. | |
plugins.fixStyleOnlyEntries() | Create and return a webpack-fix-style-only-entries instance to remove empty JS bundles for style-only entrypoints. | |
D | plugins.hotModuleReplacement() | Create and return a new webpack.HotModuleReplacementPlugin instance. |
plugins.manifest() | : Create and return a new webpack-manifest-plugin instance, preconfigured to write the manifest file while running from a dev server. | |
P | plugins.miniCssExtract() | Create and return a new mini-css-extract-plugin instance. |
P | plugins.terser() | Create and return a new terser-webpack-plugin instance, preconfigured with defaults based on create-react-app . |
P: Included in presets.production()
D: Included in presets.development()