-
Notifications
You must be signed in to change notification settings - Fork 1
/
vue.config.js
39 lines (38 loc) · 960 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 path = require('path');
const CopyWebpackPlugin = require('copy-webpack-plugin');
module.exports = {
configureWebpack: {
resolve: {
alias: {
'@': __dirname + '/client',
},
},
entry: {
app: './client/main.js'
},
plugins: [
new CopyWebpackPlugin([{
from: path.join(__dirname, 'client/static'),
to: path.join(__dirname, 'dist'),
toType: 'dir',
ignore: ['.DS_Store']
}])
]
},
chainWebpack: config => {
config.resolve.extensions.prepend('.mjs');
config.module.rule('mjs').test(/\.mjs$/).include.add(/node_modules/).end().type('javascript/auto');
},
devServer: {
contentBase: path.join(__dirname, 'client/static'),
disableHostCheck: true
},
pages: {
index: {
entry: 'client/main.js',
template: 'client/index.html',
title: 'Ballistics'
}
},
publicPath: process.env.NODE_ENV === 'production' ? './' : '/'
}