Skip to content

Commit f971829

Browse files
authored
add warning about jest
to transpileDependencies docs
1 parent 14b2c6e commit f971829

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/config/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,14 @@ Deprecated since Vue CLI 3.3, please use [`publicPath`](#publicPath) instead.
187187
- Default: `[]`
188188

189189
By default `babel-loader` ignores all files inside `node_modules`. If you want to explicitly transpile a dependency with Babel, you can list it in this option.
190+
191+
::: warning Jest config
192+
This option is not resprected by the [cli-unit-jest plugin](#jest), because in jest, we don't have to transpile stuff from `/node_modules` unless it uses non-standard features (node 8> supports the latest ECMAScript features already).
193+
194+
However, jest sometimes has to transpile content from node_modules if the code that's consumed uses ES6 `import`/`export` syntax. In that case, use the `tranformIgnorePatterns` option in `jest.config.js`.
195+
196+
See [the plugin's README](https://github.com/vuejs/vue-cli/blob/dev/packages/%40vue/cli-plugin-unit-jest/README.md) for more information.
197+
:::
190198

191199
### productionSourceMap
192200

0 commit comments

Comments
 (0)