@@ -6,15 +6,15 @@ const path = require('path')
6
6
7
7
module . exports = {
8
8
dev : {
9
- host : 'localhost' , // can be overwritten by process.env.HOST
10
- port : 8080 , // can be overwritten by process.env.HOST, if port is in use, a free one will be determined
11
9
12
10
// Paths
13
11
assetsSubDirectory : 'static' ,
14
12
assetsPublicPath : '/' ,
15
13
proxyTable : { } ,
16
14
17
15
// Various Dev Server settings
16
+ host : 'localhost' , // can be overwritten by process.env.HOST
17
+ port : 8080 , // can be overwritten by process.env.HOST, if port is in use, a free one will be determined
18
18
autoOpenBrowser : false ,
19
19
errorOverlay : true ,
20
20
notifyOnErrors : true ,
@@ -28,18 +28,26 @@ module.exports = {
28
28
// in the browser.
29
29
showEslintErrorsInOverlay : false ,
30
30
31
- // CSS Sourcemaps off by default because relative paths are "buggy"
32
- // with this option, according to the CSS-Loader README
33
- // (https://github.com/webpack/css-loader#sourcemaps)
34
- // In our experience, they generally work as expected,
35
- // just be aware of this issue when enabling this option.
36
- cssSourceMap : false ,
31
+ /**
32
+ * Source Maps
33
+ */
34
+
35
+ // https://webpack.js.org/configuration/devtool/#development
36
+ devtool : 'eval-source-map' ,
37
37
38
38
// If you have problems debugging vue-files in devtools,
39
39
// set this to false - it *may* help
40
40
// https://vue-loader.vuejs.org/en/options.html#cachebusting
41
41
cacheBusting : true ,
42
+
43
+ // CSS Sourcemaps off by default because relative paths are "buggy"
44
+ // with this option, according to the CSS-Loader README
45
+ // (https://github.com/webpack/css-loader#sourcemaps)
46
+ // In our experience, they generally work as expected,
47
+ // just be aware of this issue when enabling this option.
48
+ cssSourceMap : false ,
42
49
} ,
50
+
43
51
build : {
44
52
// Template for index.html
45
53
index : path . resolve ( __dirname , '../dist/index.html' ) ,
@@ -49,19 +57,24 @@ module.exports = {
49
57
assetsSubDirectory : 'static' ,
50
58
assetsPublicPath : '/' ,
51
59
60
+ /**
61
+ * SourceMap
62
+ */
52
63
productionSourceMap : true ,
64
+ // https://webpack.js.org/configuration/devtool/#production
65
+ devtool : '#source-map' ,
66
+
53
67
// Gzip off by default as many popular static hosts such as
54
68
// Surge or Netlify already gzip all static assets for you.
55
69
// Before setting to `true`, make sure to:
56
70
// npm install --save-dev compression-webpack-plugin
57
-
58
71
productionGzip : false ,
59
72
productionGzipExtensions : [ 'js' , 'css' ] ,
73
+
60
74
// Run the build command with an extra argument to
61
75
// View the bundle analyzer report after build finishes:
62
76
// `npm run build --report`
63
77
// Set to `true` or `false` to always turn it on or off
64
-
65
78
bundleAnalyzerReport : process . env . npm_config_report
66
79
}
67
80
}
0 commit comments