UNPKG

@roots/bud-extensions

Version:

bud.js core module

25 lines (24 loc) 733 B
import { __decorate } from "tslib"; import { Extension } from '@roots/bud-framework/extension'; import { bind, label, options, plugin, } from '@roots/bud-framework/extension/decorators'; import { default as Webpack, } from '@roots/bud-support/webpack'; /** * Webpack provide plugin configuration */ let BudProvide = class BudProvide extends Extension { /** * {@link Extension.when} */ when() { return this.options && Object.keys(this.options).length > 0; } }; __decorate([ bind ], BudProvide.prototype, "when", null); BudProvide = __decorate([ label(`@roots/bud-extensions/webpack-provide-plugin`), plugin(Webpack.ProvidePlugin), options({}) ], BudProvide); export default BudProvide;