Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/content/guides/package-exports.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,20 @@ Example:

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

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.

For example, given the following configuration:

```json
{
"exports": {
".": ["-bad-specifier-", "./non-existent.js", "./existent.js"]
}
}
```

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`.

## Conditional syntax

Instead of providing results directly in the `exports` field,
Expand Down