Skip to content

Commit acdc407

Browse files
committed
Add caution message to versioned docs
1 parent 29452cb commit acdc407

File tree

4 files changed

+24
-0
lines changed

4 files changed

+24
-0
lines changed

website/versioned_docs/version-29.4/Configuration.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -929,6 +929,12 @@ const config: Config = {
929929
export default config;
930930
```
931931

932+
:::caution
933+
934+
It is discouraged to use `'.'` as one of the `moduleDirectories`, because this prevents scoped packages such as `@emotion/react` from accessing packages with the same subdirectory name (`react`). See [this issue](https://github.com/jestjs/jest/issues/10498) for more details. In most cases, it is preferable to use the [moduleNameMapper](#modulenamemapper-objectstring-string--arraystring) configuration instead.
935+
936+
:::
937+
932938
### `moduleFileExtensions` \[array<string>]
933939

934940
Default: `["js", "mjs", "cjs", "jsx", "ts", "tsx", "json", "node"]`

website/versioned_docs/version-29.5/Configuration.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -929,6 +929,12 @@ const config: Config = {
929929
export default config;
930930
```
931931

932+
:::caution
933+
934+
It is discouraged to use `'.'` as one of the `moduleDirectories`, because this prevents scoped packages such as `@emotion/react` from accessing packages with the same subdirectory name (`react`). See [this issue](https://github.com/jestjs/jest/issues/10498) for more details. In most cases, it is preferable to use the [moduleNameMapper](#modulenamemapper-objectstring-string--arraystring) configuration instead.
935+
936+
:::
937+
932938
### `moduleFileExtensions` \[array<string>]
933939

934940
Default: `["js", "mjs", "cjs", "jsx", "ts", "tsx", "json", "node"]`

website/versioned_docs/version-29.6/Configuration.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -929,6 +929,12 @@ const config: Config = {
929929
export default config;
930930
```
931931

932+
:::caution
933+
934+
It is discouraged to use `'.'` as one of the `moduleDirectories`, because this prevents scoped packages such as `@emotion/react` from accessing packages with the same subdirectory name (`react`). See [this issue](https://github.com/jestjs/jest/issues/10498) for more details. In most cases, it is preferable to use the [moduleNameMapper](#modulenamemapper-objectstring-string--arraystring) configuration instead.
935+
936+
:::
937+
932938
### `moduleFileExtensions` \[array<string>]
933939

934940
Default: `["js", "mjs", "cjs", "jsx", "ts", "tsx", "json", "node"]`

website/versioned_docs/version-29.7/Configuration.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -929,6 +929,12 @@ const config: Config = {
929929
export default config;
930930
```
931931

932+
:::caution
933+
934+
It is discouraged to use `'.'` as one of the `moduleDirectories`, because this prevents scoped packages such as `@emotion/react` from accessing packages with the same subdirectory name (`react`). See [this issue](https://github.com/jestjs/jest/issues/10498) for more details. In most cases, it is preferable to use the [moduleNameMapper](#modulenamemapper-objectstring-string--arraystring) configuration instead.
935+
936+
:::
937+
932938
### `moduleFileExtensions` \[array<string>]
933939

934940
Default: `["js", "mjs", "cjs", "jsx", "ts", "tsx", "json", "node"]`

0 commit comments

Comments
 (0)