-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
/
nuxt.config.js
59 lines (53 loc) · 1.63 KB
/
nuxt.config.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
const path = require('path');
const fs = require('fs');
module.exports = {
rootDir: path.resolve(__dirname, '..'),
srcDir: path.resolve(__dirname, '..', 'docs', 'nuxt'),
dev: process.env.NODE_ENV !== 'production',
head: {
title: 'BootstrapVue',
meta: [
{charset: 'utf-8'},
{name: 'viewport', content: 'width=device-width, initial-scale=1'}
],
link: [
{rel: 'icon', href: '/banner.png', sizes: '16x16', type: 'image/png'}
]
},
loading: {
color: '#4fc08d'
},
build: {
extractCSS: true,
extend(config) {
config.module.rules.push({
test: /\.md$/,
use: [
{loader: 'html-loader'},
{loader: 'highlight-loader'},
{loader: 'markdown-loader', options: {}}
]
});
}
},
generate: {
dir: 'docs-dist',
routes: () => {
return fs.readdirSync('docs/components')
.filter(c => c !== 'index.js' && c[0] !== '_')
.map(component => '/docs/components/' + component);
}
},
plugins: [
'~plugins/bootstrap-vue.js',
'~plugins/codemirror.js',
'~plugins/ga.js'
],
css: [
path.resolve(__dirname, '../node_modules/bootstrap/dist/css/bootstrap.css'),
path.resolve(__dirname, '../node_modules/highlightjs/styles/github-gist.css'),
path.resolve(__dirname, '../node_modules/codemirror/lib/codemirror.css'),
'~assets/css/docs.min.css',
'~assets/css/styles.css'
]
};