-
Notifications
You must be signed in to change notification settings - Fork 0
/
vue.config.js
40 lines (38 loc) · 931 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
40
const path = require('path')
const HtmlWebpackPlugin = require('html-webpack-plugin')
function resolveSrc (_path) {
return path.join(__dirname, _path)
}
module.exports = {
devServer: {
public: '0.0.0.0:' + process.env.DEVELOPMENT_NODE_PORT,
port: process.env.DEVELOPMENT_NODE_PORT
},
outputDir: path.resolve(__dirname, './public'),
configureWebpack: {
entry: {
app: './frontend/main.js'
},
output: {
filename: 'js/application.' + Date.now() + '.js'
},
resolve: {
alias: {
'@': resolveSrc('frontend'),
src: resolveSrc('frontend'),
assets: resolveSrc('frontend/assets')
}
},
plugins: [
new HtmlWebpackPlugin({
template: './frontend/templates/index.html'
})
]
},
css: {
sourceMap: !(process.env.NODE_ENV === 'production'),
extract: {
filename: 'css/stylesheet.' + Date.now() + '.css'
}
}
}