-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
54 lines (53 loc) · 1.37 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// const fs = require('fs');
// const CompressionPlugin = require("compression-webpack-plugin");
module.exports = {
pages: {
index: {
entry: "spa/src/entries/index.js",
template: 'spa/public/index.html',
filename: 'index.html',
title: 'ECMS',
chunks: ['chunk-vendors', 'chunk-common', 'index']
}
},
outputDir: 'public',
indexPath: process.env.NODE_ENV === 'production' ? '../resources/views/index.blade.php' : 'index.html',
// configureWebpack: {
//
// },
devServer: {
// host: 'ecms.betterde.com',
// port: 443,
// http2: true,
// https: {
// key: fs.readFileSync('./cert/betterde.com.key'),
// cert: fs.readFileSync('./cert/fullchain.cer'),
// ca: fs.readFileSync('./cert/ca-bundle.trust.crt'),
// },
proxy: {
'/api': {
target: 'http://ecms.it/',
ws: true,
changeOrigin: true,
secure: false,
pathRewrite: {
'^/api': '/api'
}
}
},
compress: true,
open: 'Google Chrome'
},
// configureWebpack: config => {
// if (process.env.NODE_ENV === 'production') {
// config.plugins.push(new CompressionPlugin({
// algorithm: 'gzip',
// test: /\.js$|\.css/,
// threshold: 10240,
// minRatio: 0.8,
// deleteOriginalAssets: true
// })
// )
// }
// }
};