Skip to content

Commit

Permalink
docs: add thread-loader warnings (#5777) [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
RobbinBaauw authored Aug 15, 2020
1 parent a1ee583 commit c227e1f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,10 @@ In v3 this means the opposite of `css.requireModuleExtension`.

Whether to use `thread-loader` for Babel or TypeScript transpilation. This is enabled for production builds when the system has more than 1 CPU cores. Passing a number will define the amount of workers used.

::: warning
Do not use `parallel` in combination with non-serializable loader options, such as regexes, dates and functions. These options would not be passed correctly to the respective loaders which may lead to unexpected errors.
:::

### pwa

- Type: `Object`
Expand Down
2 changes: 2 additions & 0 deletions docs/core-plugins/babel.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ module.exports = {

[thread-loader](https://github.com/webpack-contrib/thread-loader) is enabled by default when the machine has more than 1 CPU cores. This can be turned off by setting `parallel: false` in `vue.config.js`.

`parallel` should be set to `false` when using Babel in combination with non-serializable loader options, such as regexes, dates and functions. These options would not be passed correctly to `babel-loader` which may lead to unexpected errors.

## Installing in an Already Created Project

``` sh
Expand Down
2 changes: 2 additions & 0 deletions docs/core-plugins/typescript.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ If opted to use [TSLint](https://palantir.github.io/tslint/) during project crea

[thread-loader](https://github.com/webpack-contrib/thread-loader) is enabled by default when the machine has more than 1 CPU cores. This can be turned off by setting `parallel: false` in `vue.config.js`.

`parallel` should be set to `false` when using Typescript in combination with non-serializable loader options, such as regexes, dates and functions. These options would not be passed correctly to `ts-loader` which may lead to unexpected errors.

## Installing in an Already Created Project

``` sh
Expand Down
2 changes: 2 additions & 0 deletions packages/@vue/cli-plugin-babel/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ module.exports = {

[thread-loader](https://github.com/webpack-contrib/thread-loader) is enabled by default when the machine has more than 1 CPU cores. This can be turned off by setting `parallel: false` in `vue.config.js`.

`parallel` should be set to `false` when using Babel in combination with non-serializable loader options, such as regexes, dates and functions. These options would not be passed correctly to `babel-loader` which may lead to unexpected errors.

## Installing in an Already Created Project

``` sh
Expand Down
2 changes: 2 additions & 0 deletions packages/@vue/cli-plugin-typescript/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ If opted to use [TSLint](https://palantir.github.io/tslint/) during project crea

[thread-loader](https://github.com/webpack-contrib/thread-loader) is enabled by default when the machine has more than 1 CPU cores. This can be turned off by setting `parallel: false` in `vue.config.js`.

`parallel` should be set to `false` when using Typescript in combination with non-serializable loader options, such as regexes, dates and functions. These options would not be passed correctly to `ts-loader` which may lead to unexpected errors.

## Installing in an Already Created Project

``` sh
Expand Down

0 comments on commit c227e1f

Please sign in to comment.