-
Notifications
You must be signed in to change notification settings - Fork 2
/
vue.config.js
44 lines (41 loc) · 1.03 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
const path = require('path');
module.exports = {
devServer: {
port: 8080
},
productionSourceMap: true,
outputDir: 'dist',
publicPath: './',
chainWebpack: config => {
config.resolve.alias.set('@', path.resolve(__dirname, 'src'));
config.optimization.minimize(false);
config.plugin('html')
.tap(args => {
args[0].title = 'Attribute Reporter';
args[0].minify = false;
return args;
});
// this is to give custom names to the built .css files, if any (these get build if we use SCSS contained within the .vue components within the tag <style lang="scss">)
if (config.plugins.has('extract-css')) {
const extractCSSPlugin = config.plugin('extract-css');
extractCSSPlugin && extractCSSPlugin.tap(() => [{
filename: '[name].css',
chunkFilename: '[name].css'
}])
}
},
configureWebpack: {
output: {
filename: '[name].min.js',
//sourceMapFilename: '[name].js.map',
chunkFilename: '[name].min.js'
},
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
}
},
plugins: [
]
}
}