-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy pathvue.config.js
37 lines (34 loc) · 1.11 KB
/
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
37
const WebpackCdnPlugin = require('webpack-cdn-plugin')
const prodConfig = {
devtool: false,
externals: {
database: 'Vuelog.database'
},
plugins: [
new WebpackCdnPlugin({
modules: [
{ name: 'fastclick', var: 'FastClick', path: 'lib/fastclick.js' },
{ name: 'marked', var: 'marked', path: 'marked.min.js' },
{ name: 'prismjs', var: 'Prism', path: 'prism.js' },
{ name: 'vue', var: 'Vue', path: 'dist/vue.runtime.min.js' },
{ name: 'vuex', var: 'Vuex', path: 'dist/vuex.min.js' },
{ name: 'vue-router', var: 'VueRouter', path: 'dist/vue-router.min.js' },
{ name: 'vue-meta', var: 'VueMeta', path: 'dist/vue-meta.min.js' },
{ name: 'vue-i18n', var: 'VueI18n', path: 'dist/vue-i18n.min.js' }
],
prodUrl: '//cdn.jsdelivr.net/npm/:name@:version/:path',
crossOrigin: 'anonymous'
})
]
}
const devConfig = {
devtool: 'source-map',
externals: {
database: 'Vuelog.database'
}
}
module.exports = {
configureWebpack: process.env.NODE_ENV === 'production' ? prodConfig : devConfig,
outputDir: 'docs',
publicPath: '.'
}