Skip to content

Commit d585051

Browse files
authored
chore(nuxt plugin): minor updates (bootstrap-vue#3240)
1 parent 50bbe6a commit d585051

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

nuxt/index.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ module.exports = function nuxtBootstrapVue(moduleOptions = {}) {
1919
}
2020

2121
// Ensure we have arrays
22-
this.options.css = this.options.css || []
23-
this.options.build.transpile = this.options.build.transpile || []
22+
this.options.css = [].concat(this.options.css || [])
23+
this.options.build.transpile = [].concat(this.options.build.transpile || [])
2424

2525
const bootstrapVueCSS = pickFirst(
2626
options.bootstrapVueCSS,
@@ -62,6 +62,7 @@ module.exports = function nuxtBootstrapVue(moduleOptions = {}) {
6262

6363
templateOptions[type] = bvPlugins
6464
// Normalize plugin name to `${Name}Plugin` (component) or `VB${Name}Plugin` (directive)
65+
// Required for backwards compatability with old plugin import names
6566
.map(plugin => {
6667
plugin = type === 'directivePlugins' && !/^VB/.test(plugin) ? `VB${plugin}` : plugin
6768
plugin = /Plugin$/.test(plugin) ? plugin : `${plugin}Plugin`

0 commit comments

Comments
 (0)