Make handler optional in object plugins
This commit is contained in:
parent
53dff626a7
commit
94a1d30809
3 changed files with 44 additions and 6 deletions
|
|
@ -29,7 +29,7 @@ export default function(plugins, config) {
|
|||
const getConfigValue = (path, defaultValue) => _.get(config, path, defaultValue)
|
||||
|
||||
plugins.forEach(plugin => {
|
||||
const handler = isFunction(plugin) ? plugin : plugin.handler
|
||||
const handler = isFunction(plugin) ? plugin : _.get(plugin, 'handler', () => {})
|
||||
|
||||
handler({
|
||||
postcss,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue