Skip to content

Commit

Permalink
docs(guides): update alternatives
Browse files Browse the repository at this point in the history
  • Loading branch information
chenxsan committed Jul 24, 2024
1 parent cff1ab4 commit 36533ba
Showing 1 changed file with 14 additions and 0 deletions.
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.93.1, 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.93.1+ 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

0 comments on commit 36533ba

Please sign in to comment.