forked from isobolewski/playcanvas-vue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
34 lines (30 loc) · 1.02 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
const path = require('path');
const contentBase = path.resolve();
module.exports = {
productionSourceMap: true,
configureWebpack: config => {
config.optimization = {
moduleIds: 'natural',
mangleWasmImports: true,
};
config.devServer = {
compress: true, // Use GZip compression
before(app) {
// use proper mime-type for wasm files
app.get('*.wasm', function (req, res, next) {
const options = {
root: contentBase + '/public/',
dotfiles: 'deny',
headers: {
'Content-Type': 'application/wasm'
}
};
res.sendFile(req.url, options, function (err) {
if (err) { next(err); }
});
});
},
// open: 'Google Chrome' // Start Google Chrome after npm run serve
};
}
}