WebpackConfigHelpers
Parameters
cwd
Webpack module used to create config.
Returns object
Returns wrapper around all loaders from config.
Parameters
configobject webpack config.
Returns Array<LoaderWrapper>
Returns wrapper around all rules from config.
Parameters
configobject webpack config.
Returns Array<RuleWrapper>
Returns wrapper around all plugins from config.
Parameters
configobject webpack config.
Returns Array<PluginWrapper>
Parameters
configobject webpack config.filestring path to test against loader. Resolved relatively to $PWD.
Returns Array<RuleWrapper>
Returns loaders that match provided name.
Parameters
configobject webpack config.namestring name of loader.
Examples
helpers.getLoadersByName(config, 'less-loader')Returns Array<LoaderWrapper>
Returns plugins that match provided name.
Parameters
configobject webpack config.namestring name of loader.
Examples
helpers.getPluginsByName(config, 'HtmlWebpackPlugin')Returns Array<PluginWrapper>
Returns plugins that match provided type.
Parameters
configobject webpack config.typeany type of plugin.
Examples
helpers.getPluginsByType(config, webpack.optimize.CommonsChunkPlugin)Returns Array<PluginWrapper>
Sets template used by HtmlWebpackPlugin.
Parameters
configobject webpack config.templatestring template path. See HtmlWebpackPlugin docs.
Wrapper around webpack's plugin.
Type: object
Properties
pluginobject plugin entry.indexnumber index of plugin in config.
Wrapper around webpack's rule.
Type: object
Properties
ruleobject rule entry.indexnumber index of rule in config.
Wrapper around webpack's loader entry.
Type: object
Properties
ruleobject rule entry.ruleIndexnumber index of rule in config.loaderobject loader entry.loaderIndexnumber index of loader in rule.