Installation
npm i -S webpack-null-plugin
Usage
This plugin uses the null object pattern to simplify webpack configs with conditional plugins.
For example, perhaps you only want to run the start-server-webpack-plugin
plugin when the environment variable WEBPACK_START_SERVER equals 1:
const StartServerPlugin = ;const NullPlugin = ;const shouldRunServer = processenvWEBPACK_START_SERVER === '1';moduleexports =/* ...rest of config... */plugins:shouldRunServer ? 'index.js' :;