-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvue.config.js
72 lines (64 loc) · 1.89 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/* eslint-disable no-console */
const fs = require('fs');
const version = require('./package.json').version;
process.env.VUE_APP_VERSION = version;
if (process.env.NODE_ENV === 'production') {
const fileName = `version_${version}.txt`;
const filePath = `${__dirname}/public/${fileName}`;
fs.writeFile(filePath, version, (err) => {
if (err) {
return console.log(`Tried to created file ${fileName}. Error: ${err}`);
}
return console.log(`Created version file ${fileName} for easy build version highlight.`);
});
}
console.log(`starting ${version} with on ${process.env.NODE_ENV}`);
module.exports = {
// publicPath: process.env.NODE_ENV === 'production' ? './' : '/',
publicPath: './',
assetsDir: './static',
runtimeCompiler: true,
css: {
sourceMap: true,
},
transpileDependencies: [
'vuetify',
'date-fns',
],
// devServer: {
// proxy: {
// '/gcnet': {
// target: 'https://www.envidat.ch/ui/proxy/ServiceProxyServlet?server=0&serverpath=',
// secure: true,
// pathRewrite: {
// '^/api': '/v2/api',
// },
// }
// },
// },
// proxyTable: {
// '/gcnet': {
// target: 'https://www.envidat.ch/ui/proxy/ServiceProxyServlet?server=0&serverpath=',
// /* target: 'http://www.envidat.ch', */
// changeOrigin: true,
// secure: false,
// // logLevel: 'debug',
// pathRewrite: function (path, req) {
// const from = path;
// // path = encodeURIComponent(path);
// path = path.replace('?', '&');
// path = path.replace("'", "%22");
// console.log('replaced path from ' + from + ' to: ' + path);
// return path;
// }
// },
// },
chainWebpack: (config) => {
config.module
.rule('html')
.test(/map_html\.html$/)
.use('html-loader')
.loader('html-loader')
.end();
},
};