UNPKG

@roots/bud-api

Version:

bud.js core module

8 lines (7 loc) 311 B
import isFunction from '@roots/bud-support/isFunction'; export const externals = async function (externals) { const current = this.hooks.filter(`build.externals`, {}); return this.hooks.on(`build.externals`, isFunction(externals) ? externals(current) : { ...current, ...externals }); };