webpack/enhanced-resolve
Last release: 2 days ago
enhanced-resolve provides an async require.resolve-style API for resolving module or file requests according to Node.js resolving rules. It is highly configurable, supports sync, async, and promise APIs, and lets you create customized resolver functions with options like extensions, plugins, and filesystem behavior (including an optional cached filesystem).
Project status
- Actively maintained, with recent tagged updates through 2026-06-05 and an upstream push on 2026-06-06, indicating ongoing development rather than maintenance mode.
- Apparent cadence is frequent, with multiple updates in late May and early June 2026 (v5.23.0 on 2026-06-05, v5.22.2 on 2026-06-03, and v5.22.1 on 2026-05-28).
AI summary generated Today
Recent updates
v5.23.0
2 days agov5.23.0 adds support for passing file URL instances in various path-like enhanced-resolve options by converting them to filesystem paths internally. The change is accompanied by updated TypeScript typings and a new test suite covering file: URL inputs across roots, modules, alias, restrictions, and tsconfig-related options.
Featuresv5.22.2
4 days agov5.22.2 implements the documented behavior change for `exports` resolution under `restrictions`: when a valid `exports` target is filtered out by restrictions, the resolver now falls back to the next `modules` entry instead of throwing. The implementation is done via an internal marker shared between `RestrictionsPlugin` and `ExportsFieldPlugin`, and new tests/fixtures were added to cover the fallback and marker non-leakage behavior.
v5.22.1
1 week agov5.22.1 is a patch release that fixes a security-relevant path traversal style issue where the `restrictions` feature could be bypassed using an in-root symlink pointing outside the configured restriction root. The fix is implemented in `SymlinkPlugin` and is covered by new tests for absolute and relative symlink cases.
BreakingSecurityv5.22.0
2 weeks agov5.22.0 extends `CachedInputFileSystem#purge` to support an optional `{ exact?: boolean }` argument, allowing callers to purge either prefix-matching entries (default) or only exact key matches (`exact: true`). The implementation also tightens how “no argument” is detected, changing purge behavior for certain falsy values and adding related test coverage.
Featuresv5.21.6
2 weeks agov5.21.6 focuses on performance improvements to alias resolution and tsconfig path resolution. It adds a hot-path optimization for alias matching by first character, and memoizes per-(tsconfigPathsMap, requestPath) context selection in TsconfigPathsPlugin.
v5.21.5
2 weeks agoRelease v5.21.5 is a patch update focused on TypeScript tsconfig path resolution behavior. It prevents the resolver from incorrectly adding the tsconfig directory (via baseUrl-derived paths) to module search paths when the tsconfig does not define baseUrl.
v5.21.4
2 weeks agoThis release updates enhanced-resolve's TsconfigPathsPlugin behavior when `tsconfig: true` is enabled. Instead of only checking for a `tsconfig.json` at the initial resolution directory, it now searches upward through parent directories to locate the nearest `tsconfig.json`, then uses its path mappings.
Breakingv5.21.3
3 weeks agov5.21.3 is a patch release focused on TsconfigPathsPlugin resolution behavior. It updates the resolver so that when a tsconfig `paths` pattern matches but the mapped file does not exist, resolution falls through to normal node_modules resolution (matching TypeScript).
v5.21.2
1 month agov5.21.2 is a patch release focused on TsconfigPathsPlugin correctness fixes (circular project references stack overflow, and extends resolution for unscoped npm packages), plus several resolver performance optimizations. The diff shows mostly internal hot-path refactors and cache/iteration reductions, with behavior changes concentrated in tsconfig extends and reference handling.
Featuresv5.21.1
1 month agov5.21.1 is a patch release focused on reducing allocations on hot resolution paths and fixing regressions around resolveContext.stack iteration and TsconfigPathsPlugin working with resolveSync + useSyncFileSystemCalls. The diff shows substantial internal refactors in resolver and field-processing logic to avoid regex/iterator overhead, plus a switch of JSONC reading to a callback style to preserve synchronous behavior.