UNPKG

bootstrap-vue-loader

Version:

A Webpack plugin for automatic BootstrapVue components and directives importing, mainly for treeshaking

21 lines (16 loc) 794 B
// IMPORTANT: Do NOT use ES2015 features in this file (except for modules). // This module is a runtime utility for cleaner component module output and will // be included in the final webpack user bundle. // Forked directly from Vuetify-loader : https://github.com/vuetifyjs/vuetify-loader/blob/master/lib/runtime/installDirectives.js module.exports = function installDirectives (component, directives) { var options = typeof component.exports === 'function' ? component.exports.extendOptions : component.options if (typeof component.exports === 'function') { options.directives = component.exports.options.directives } options.directives = options.directives || {} for (var i in directives) { options.directives[i] = options.directives[i] || directives[i] } }