-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathvue.config.js
36 lines (34 loc) · 965 Bytes
/
vue.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
const chokidar = require('chokidar')
module.exports = {
devServer: {
host: '0.0.0.0',
hot: true,
disableHostCheck: true,
before(app, server) {
chokidar.watch([
'kolibri-docs/**/*'
]).on('all', function() {
server.sockWrite(server.sockets, 'content-changed');
})
},
},
chainWebpack: config => {
// Markdown Loader
config.module
.rule('markdown')
.test(/\.md$/)
.use('file-loader')
.loader('file-loader?name=docs/[name]-[hash:6].[ext]')
.end()
config.output.filename('js/[name].[hash:8].js')
config.output.chunkFilename('js/[name].[hash:8].js')
},
publicPath: process.env['IPFS_BUILD'] ? './' : '/',
css: {
loaderOptions: {
css: {
url: !process.env['IPFS_BUILD'],
}
}
}
};