-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathvue.config.js
39 lines (37 loc) · 948 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
37
38
39
const WebpackCDNPlugin = require('../../')
const plugin = new WebpackCDNPlugin({
keepLocalFiles: true,
keepSourcemaps: false,
backupHTMLFiles: false,
manifestFilename: false,
uploadContent({ file, content, extname }) {
// Test error handling
if (file.endsWith('.svg') || file.endsWith('.css')) {
return false
}
return `//localhost:8080/${file}`
// return require('your-cdn-provider').content(content, extname, {
// https: true
// })
}
})
module.exports = {
assetsDir: 'static',
productionSourceMap: true,
configureWebpack: {
plugins: process.env.NODE_ENV === 'production' ? [plugin] : [],
optimization: {
minimize: false
}
},
pages: {
index: {
entry: 'src/main.js',
template: 'public/index.html',
filename: 'index.html',
title: 'Index Page',
chunks: ['chunk-vendors', 'chunk-common', 'index']
},
subpage: 'src/subpage.js'
}
}