forked from bootstrap-vue/bootstrap-vue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
33 lines (27 loc) · 825 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
Nuxt.js module for bootstrap-vue
Usage:
- Install both bootstrap and bootstrap-vue packages
- Add this into your nuxt.config.js file:
{
modules: [
'bootstrap-vue/nuxt'
]
}
*/
const { resolve } = require('path')
module.exports = function nuxtBootstrapVue (moduleOptions) {
// Conditionally require bootstrap original css too if not explicitly disabled
if (moduleOptions.css !== false) {
this.options.css.unshift('bootstrap/dist/css/bootstrap.css')
}
// Register plugin
this.addPlugin({
src: resolve(__dirname, 'plugin.js'),
fileName: 'bootstrap-vue.js',
moduleOptions
})
// Add library styles
this.options.css.push('bootstrap-vue/dist/bootstrap-vue.css')
}
module.exports.meta = require('./package.json')