@@ -23,37 +23,137 @@ interface ExtractOptions {
23
23
}
24
24
25
25
interface CSSOptions {
26
+ /**
27
+ * Default: `true`
28
+ *
29
+ * By default, only files that ends in `*.module.[ext]` are treated as CSS modules
30
+ */
26
31
requireModuleExtension ?: boolean ;
32
+ /**
33
+ * Default: `true`
34
+ *
35
+ * Whether to extract CSS in your components into a standalone CSS files (instead of inlined in JavaScript and injected dynamically)
36
+ */
27
37
extract ?: boolean | ExtractOptions ;
38
+ /**
39
+ * Default: `false`
40
+ *
41
+ * Whether to enable source maps for CSS. Setting this to `true` may affect build performance
42
+ */
28
43
sourceMap ?: boolean ;
44
+ /**
45
+ * Default: `{}`
46
+ *
47
+ * Pass options to CSS-related loaders
48
+ */
29
49
loaderOptions ?: LoaderOptions ;
30
50
}
31
51
32
52
interface ProjectOptions {
53
+ /**
54
+ * Default: `'/'`
55
+ *
56
+ * The base URL your application bundle will be deployed at
57
+ */
33
58
publicPath ?: string ;
59
+ /**
60
+ * Default: `'dist'`
61
+ *
62
+ * The directory where the production build files will be generated in when running `vue-cli-service build`
63
+ */
34
64
outputDir ?: string ;
65
+ /**
66
+ * Default: `''`
67
+ *
68
+ * A directory (relative to `outputDir`) to nest generated static assets (js, css, img, fonts) under
69
+ */
35
70
assetsDir ?: string ;
71
+ /**
72
+ * Default: `'index.html'`
73
+ *
74
+ * Specify the output path for the generated `index.html` (relative to `outputDir`). Can also be an absolute path
75
+ */
36
76
indexPath ?: string ;
77
+ /**
78
+ * Default: `true`
79
+ *
80
+ * By default, generated static assets contains hashes in their filenames for better caching control
81
+ */
37
82
filenameHashing ?: boolean ;
83
+ /**
84
+ * Default: `false`
85
+ *
86
+ * Whether to use the build of Vue core that includes the runtime compiler
87
+ */
38
88
runtimeCompiler ?: boolean ;
89
+ /**
90
+ * Default: `[]`
91
+ *
92
+ * If you want to explicitly transpile a dependency with Babel, you can list it in this option
93
+ */
39
94
transpileDependencies ?: Array < string | RegExp > ;
95
+ /**
96
+ * Default: `true`
97
+ *
98
+ * Setting this to `false` can speed up production builds if you don't need source maps for production
99
+ */
40
100
productionSourceMap ?: boolean ;
101
+ /**
102
+ * Default: `require('os').cpus().length > 1`
103
+ *
104
+ * Whether to use `thread-loader` for Babel or TypeScript transpilation
105
+ */
41
106
parallel ?: boolean | number ;
42
- devServer ?: object ;
107
+ /**
108
+ * [All options for `webpack-dev-server`](https://webpack.js.org/configuration/dev-server/) are supported
109
+ */
110
+ devServer ?: { proxy : string | object , [ key : string ] : any } ;
111
+ /**
112
+ * Default: `undefined`
113
+ *
114
+ * Build the app in multi-page mode
115
+ */
43
116
pages ?: {
44
117
[ key : string ] : PageEntry | PageConfig ;
45
118
} ;
119
+ /**
120
+ * Default: `undefined`
121
+ *
122
+ * Configure the `crossorigin` attribute on `<link rel="stylesheet">` and `<script>` tags in generated HTML
123
+ */
46
124
crossorigin ?: '' | 'anonymous' | 'use-credentials' ;
125
+ /**
126
+ * Default: `false`
127
+ *
128
+ * Set to `true` to enable [Subresource Integrity](https://developer.mozilla.org/en-US/docs/Web/Security/Subresource_Integrity) (SRI) on `<link rel="stylesheet">` and `<script>` tags in generated HTML
129
+ */
47
130
integrity ?: boolean ;
48
131
49
132
css ?: CSSOptions ;
50
133
134
+ /**
135
+ * A function that will receive an instance of `ChainableConfig` powered by [webpack-chain](https://github.com/mozilla-neutrino/webpack-chain)
136
+ */
51
137
chainWebpack ?: ( config : ChainableWebpackConfig ) => void ;
138
+ /**
139
+ * Set webpack configuration. If the value is `Object`, will be merged into config. If value is `Function`, will receive current config as argument
140
+ */
52
141
configureWebpack ?: WebpackOptions | ( ( config : WebpackOptions ) => ( WebpackOptions | void ) ) ;
53
142
143
+ /**
144
+ * Default: `'default'`
145
+ *
146
+ * Whether to perform lint-on-save during development using [eslint-loader](https://github.com/webpack-contrib/eslint-loader)
147
+ */
54
148
lintOnSave ?: boolean | 'default' | 'warning' | 'error' ;
149
+ /**
150
+ * Pass options to the [PWA Plugin](https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-pwa)
151
+ */
55
152
pwa ?: object ;
56
153
154
+ /**
155
+ * This is an object that doesn't go through any schema validation, so it can be used to pass arbitrary options to 3rd party plugins
156
+ */
57
157
pluginOptions ?: object ;
58
158
}
59
159
0 commit comments