1
+ let { devServer } = require ( './.config.js' ) ;
2
+
1
3
module . exports = {
2
- // Project deployment base
3
- // By default we assume your app will be deployed at the root of a domain,
4
- // e.g. https://www.my-app.com/
5
- // If your app is deployed at a sub-path, you will need to specify that
6
- // sub-path here. For example, if your app is deployed at
7
- // https://www.foobar.com/my-app/
8
- // then change this to '/my-app/'
9
- baseUrl : '/' ,
10
-
11
- // where to output built files
12
- outputDir : 'dist' ,
13
-
14
- // whether to use eslint-loader for lint on save.
15
- // valid values: true | false | 'error'
16
- // when set to 'error', lint errors will cause compilation to fail.
17
- lintOnSave : true ,
18
-
19
- // use the full build with in-browser compiler?
20
- // https://vuejs.org/v2/guide/installation.html#Runtime-Compiler-vs-Runtime-only
21
- compiler : false ,
22
-
23
- // tweak internal webpack configuration.
24
- // see https://github.com/vuejs/vue-cli/blob/dev/docs/webpack.md
25
- chainWebpack : ( ) => { } ,
26
- configureWebpack : ( ) => { } ,
27
-
28
- // vue-loader options
29
- // https://vue-loader.vuejs.org/en/options.html
30
- vueLoader : { } ,
31
-
32
- // generate sourceMap for production build?
33
- productionSourceMap : true ,
34
-
35
- // CSS related options
36
- css : {
37
- // extract CSS in components into a single CSS file (only in production)
38
- extract : true ,
39
-
40
- // enable CSS source maps?
41
- sourceMap : false ,
42
-
43
- // pass custom options to pre-processor loaders. e.g. to pass options to
44
- // sass-loader, use { sass: { ... } }
45
- loaderOptions : { } ,
46
-
47
- // Enable CSS modules for all css / pre-processor files.
48
- // This option does not affect *.vue files.
49
- modules : false
50
- } ,
51
-
52
- // use thread-loader for babel & TS in production build
53
- // enabled by default if the machine has more than 1 cores
54
- parallel : require ( 'os' ) . cpus ( ) . length > 1 ,
55
-
56
- // split vendors using autoDLLPlugin?
57
- // can also be an explicit Array of dependencies to include in the DLL chunk.
58
- // See https://github.com/vuejs/vue-cli/blob/dev/docs/cli-service.md#dll-mode
59
- dll : false ,
60
-
61
- // options for the PWA plugin.
62
- // see https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-pwa
63
- pwa : { } ,
64
-
65
- // configure webpack-dev-server behavior
66
- devServer : {
67
- open : process . platform === 'darwin' ,
68
- host : '0.0.0.0' ,
69
- port : 8080 ,
70
- https : false ,
71
- hotOnly : false ,
72
- // See https://github.com/vuejs/vue-cli/blob/dev/docs/cli-service.md#configuring-proxy
73
- proxy : 'http://localhost:4000' , // string | Object
74
- before : app => { }
75
- } ,
76
-
77
- // options for 3rd party plugins
78
- pluginOptions : {
79
- // ...
80
- }
81
- }
4
+ // Project deployment base
5
+ // By default we assume your app will be deployed at the root of a domain,
6
+ // e.g. https://www.my-app.com/
7
+ // If your app is deployed at a sub-path, you will need to specify that
8
+ // sub-path here. For example, if your app is deployed at
9
+ // https://www.foobar.com/my-app/
10
+ // then change this to '/my-app/'
11
+ baseUrl : '/' ,
12
+
13
+ // where to output built files
14
+ outputDir : 'dist' ,
15
+
16
+ // whether to use eslint-loader for lint on save.
17
+ // valid values: true | false | 'error'
18
+ // when set to 'error', lint errors will cause compilation to fail.
19
+ lintOnSave : true ,
20
+
21
+ // use the full build with in-browser compiler?
22
+ // https://vuejs.org/v2/guide/installation.html#Runtime-Compiler-vs-Runtime-only
23
+ compiler : false ,
24
+
25
+ // tweak internal webpack configuration.
26
+ // see https://github.com/vuejs/vue-cli/blob/dev/docs/webpack.md
27
+ chainWebpack : ( ) => { } ,
28
+ configureWebpack : ( ) => { } ,
29
+
30
+ // vue-loader options
31
+ // https://vue-loader.vuejs.org/en/options.html
32
+ vueLoader : { } ,
33
+
34
+ // generate sourceMap for production build?
35
+ productionSourceMap : true ,
36
+
37
+ // CSS related options
38
+ css : {
39
+ // extract CSS in components into a single CSS file (only in production)
40
+ extract : true ,
41
+
42
+ // enable CSS source maps?
43
+ sourceMap : false ,
44
+
45
+ // pass custom options to pre-processor loaders. e.g. to pass options to
46
+ // sass-loader, use { sass: { ... } }
47
+ loaderOptions : { } ,
48
+
49
+ // Enable CSS modules for all css / pre-processor files.
50
+ // This option does not affect *.vue files.
51
+ modules : false ,
52
+ } ,
53
+
54
+ // use thread-loader for babel & TS in production build
55
+ // enabled by default if the machine has more than 1 cores
56
+ parallel : require ( 'os' ) . cpus ( ) . length > 1 ,
57
+
58
+ // split vendors using autoDLLPlugin?
59
+ // can also be an explicit Array of dependencies to include in the DLL chunk.
60
+ // See https://github.com/vuejs/vue-cli/blob/dev/docs/cli-service.md#dll-mode
61
+ dll : false ,
62
+
63
+ // options for the PWA plugin.
64
+ // see https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-pwa
65
+ pwa : { } ,
66
+
67
+ // configure webpack-dev-server behavior
68
+ devServer : {
69
+ open : process . platform === 'darwin' ,
70
+ host : '0.0.0.0' ,
71
+ port : 8080 ,
72
+ https : false ,
73
+ hotOnly : false ,
74
+ // See https://github.com/vuejs/vue-cli/blob/dev/docs/cli-service.md#configuring-proxy
75
+ proxy : devServer , // string | Object
76
+ before : ( app ) => { } ,
77
+ } ,
78
+
79
+ // options for 3rd party plugins
80
+ pluginOptions : {
81
+ // ...
82
+ } ,
83
+ } ;
0 commit comments