Skip to content

Commit 468ac75

Browse files
authored
docs(guides): update alternatives (#7326)
* docs(guides): update alternatives * Apply suggestions from code review
1 parent 4ffff1a commit 468ac75

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/content/guides/package-exports.mdx

+14
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,20 @@ Example:
6767

6868
Here `package/things/apple` might be found in `.../package/good-things/apple` or in `.../package/bad-things/apple`.
6969

70+
W> As of version 5.94.0, webpack's behavior has been updated to align with Node's behavior. It now selects the first valid path without attempting further resolutions and throws an error if the path cannot be resolved.
71+
72+
For example, given the following configuration:
73+
74+
```json
75+
{
76+
"exports": {
77+
".": ["-bad-specifier-", "./non-existent.js", "./existent.js"]
78+
}
79+
}
80+
```
81+
82+
Webpack 5.94.0+ will now throw an error since `non-existent.js` is not found while the previous behavior would have resolved to `existent.js`.
83+
7084
## Conditional syntax
7185

7286
Instead of providing results directly in the `exports` field,

0 commit comments

Comments
 (0)