You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/options.md
+69-49Lines changed: 69 additions & 49 deletions
Original file line number
Diff line number
Diff line change
@@ -161,6 +161,15 @@ module.exports = {
161
161
162
162
Note this is automatically set to `false`if the `devtool` option is not present in the main webpack config.
163
163
164
+
### postcss.cascade
165
+
166
+
> New in14.2.0
167
+
168
+
- type:`boolean`
169
+
- default:`false`
170
+
171
+
Setthis to `true` to enable cascading PostCSS config file loading. For example, you can have extra `.postcssrc` files in nested source directories to apply different PostCSS configs to different files in your project.
172
+
164
173
### esModule
165
174
166
175
> This option has been removed in v14.0. In v14.0 and above, `*.vue` files always expose ES modules.
@@ -238,62 +247,62 @@ module.exports = {
238
247
- type:`boolean`
239
248
- default:`false`
240
249
241
-
Automatically extracts the CSS using `extract-text-webpack-plugin`. Worksfor most pre-processors out of the box, and handles minification in production as well.
250
+
Automatically extracts the CSS using `extract-text-webpack-plugin`. Worksfor most pre-processors out of the box, and handles minification in production as well.
242
251
243
-
The value passed in can be `true`, or an instance of the plugin (so that you can use multiple instances of the extract plugin for multiple extracted files).
252
+
The value passed in can be `true`, or an instance of the plugin (so that you can use multiple instances of the extract plugin for multiple extracted files).
244
253
245
-
This should be only used in production so that hot-reload works during development.
254
+
This should be only used in production so that hot-reload works during development.
246
255
247
-
Example:
256
+
Example:
248
257
249
-
``` js
250
-
// webpack.config.js
251
-
var ExtractTextPlugin = require("extract-text-webpack-plugin")
252
-
253
-
module.exports = {
254
-
// other options...
255
-
module: {
256
-
rules: [
257
-
{
258
-
test: /\.vue$/,
259
-
loader: 'vue-loader',
260
-
options: {
261
-
extractCSS: true
258
+
``` js
259
+
// webpack.config.js
260
+
var ExtractTextPlugin = require("extract-text-webpack-plugin")
261
+
262
+
module.exports = {
263
+
// other options...
264
+
module: {
265
+
rules: [
266
+
{
267
+
test: /\.vue$/,
268
+
loader: 'vue-loader',
269
+
options: {
270
+
extractCSS: true
271
+
}
262
272
}
263
-
}
273
+
]
274
+
},
275
+
plugins: [
276
+
new ExtractTextPlugin("style.css")
264
277
]
265
-
},
266
-
plugins: [
267
-
new ExtractTextPlugin("style.css")
268
-
]
269
-
}
270
-
```
278
+
}
279
+
```
271
280
272
-
Or passing in an instance of the plugin:
281
+
Or passing in an instance of the plugin:
273
282
274
-
``` js
275
-
// webpack.config.js
276
-
var ExtractTextPlugin = require("extract-text-webpack-plugin")
277
-
var plugin = new ExtractTextPlugin("style.css")
278
-
279
-
module.exports = {
280
-
// other options...
281
-
module: {
282
-
rules: [
283
-
{
284
-
test: /\.vue$/,
285
-
loader: 'vue-loader',
286
-
options: {
287
-
extractCSS: plugin
283
+
``` js
284
+
// webpack.config.js
285
+
var ExtractTextPlugin = require("extract-text-webpack-plugin")
286
+
var plugin = new ExtractTextPlugin("style.css")
287
+
288
+
module.exports = {
289
+
// other options...
290
+
module: {
291
+
rules: [
292
+
{
293
+
test: /\.vue$/,
294
+
loader: 'vue-loader',
295
+
options: {
296
+
extractCSS: plugin
297
+
}
288
298
}
289
-
}
299
+
]
300
+
},
301
+
plugins: [
302
+
plugin
290
303
]
291
-
},
292
-
plugins: [
293
-
plugin
294
-
]
295
-
}
296
-
```
304
+
}
305
+
```
297
306
298
307
### optimizeSSR
299
308
@@ -302,7 +311,7 @@ module.exports = {
302
311
- type:`boolean`
303
312
- default:`true` when the webpack config has `target: 'node'` and `vue-template-compiler` is at version 2.4.0 or above.
304
313
305
-
Enable Vue 2.4SSR compilation optimization that compiles part of the vdom trees returned by render functions into plain strings, which improves SSRperformance. In some cases you might want to explicitly turn it off because the resulting render functions can only be used forSSR and cannot be used for client-side rendering or testing.
314
+
Enable Vue 2.4SSR compilation optimization that compiles part of the vdom trees returned by render functions into plain strings, which improves SSRperformance. In some cases you might want to explicitly turn it off because the resulting render functions can only be used forSSR and cannot be used for client-side rendering or testing.
306
315
307
316
### hotReload
308
317
@@ -312,5 +321,16 @@ Enable Vue 2.4 SSR compilation optimization that compiles part of the vdom trees
312
321
- default:`true`in development mode, `false`in production mode or when the webpack config has `target: 'node'`.
313
322
- allowed value:`false` (`true` will not force Hot Reload neither in production mode nor when `target: 'node'`)
314
323
315
-
Whether to use webpack [Hot Module Replacement](https://webpack.js.org/concepts/hot-module-replacement/) to apply changes in the browser **without reloading the page**.
316
-
Use thisoption (value `false`) to disable the Hot Reload feature in development mode.
324
+
Whether to use webpack [Hot Module Replacement](https://webpack.js.org/concepts/hot-module-replacement/) to apply changes in the browser **without reloading the page**.
325
+
Use thisoption (value `false`) to disable the Hot Reload feature in development mode.
326
+
327
+
### threadMode
328
+
329
+
> New in14.2.0
330
+
331
+
- type:`boolean`
332
+
- default:`false`
333
+
334
+
Setting this to true enables filesystem-based option caching so that the options for the main `vue-loader` can be properly shared with sub-loaders in other threads.
335
+
336
+
Only needed when using together with HappyPack or `thread-loader`.
0 commit comments