-
Notifications
You must be signed in to change notification settings - Fork 101
Expand file tree
/
Copy pathvue.config.js
More file actions
43 lines (42 loc) · 1.15 KB
/
vue.config.js
File metadata and controls
43 lines (42 loc) · 1.15 KB
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
const path = require('path')
module.exports = {
"publicPath": "./",
"runtimeCompiler": false,
"productionSourceMap": false,
"parallel": true,
"devServer": {
"host": "0.0.0.0",
"port": 8080,
"https": false,
"hotOnly": true,
before: function(app, server) {
const fs = require('fs')
app.get('/twha/', function(req, res) {
res.sendFile(path.join(__dirname, 'twha/index.html'))
})
app.get('/twha/*', function(req, res, next) {
const relativePath = req.path.replace('/twha', '')
const filePath = path.join(__dirname, 'twha', relativePath)
if (fs.existsSync(filePath) && fs.statSync(filePath).isFile()) {
res.sendFile(filePath)
} else {
next()
}
})
},
},
"transpileDependencies": [
"vuetify"
],
chainWebpack: config => {
config.module
.rule('js')
.exclude
.add(/src\/lib\/three.module.js/)
.add(/src\/twha\/js\/regions.js/)
.add(/node_modules\/three\/build\/three.module.js/)
.add(/public\/lib\/three.js/)
.add(/public\/lib\/SVGLoader.js/)
.add(/public\/lib\/state-machine.js/);
}
};