Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(guides): update alternatives #7326

Merged
merged 2 commits into from
Aug 24, 2024
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