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 });
};