enhanced-resolve
npmv5.24.5TypeScriptOffers a async require.resolve function. It's highly configurable.
Safe to adopt
Yes — enhanced-resolve scores well across adoption, maintenance, weight, supply chain, and licensing. 137.3M downloads per week and 1 known dependents. Last published 41 days ago. 25 releases in the last 2 years.
- AAdoption: grade A, Excellent.
137.3M downloads per week and 1 known dependents.
- AMaintenance: grade A, Excellent.
Last published 41 days ago. 25 releases in the last 2 years.
- AWeight: grade A, Excellent.
Pulls in 2 transitive packages, about 514 KB installed.
- ASupply chain: grade A, Excellent.
No install scripts, 8 maintainers, and a contained dependency surface.
- ALicense: grade A, Excellent.
MIT — permissive, with no copyleft found in the dependency tree.
Grades are computed deterministically from registry metadata collected by PackageGraph — downloads, dependents, publish dates, the resolved dependency tree, maintainer count, and declared licenses. No third-party scores are used.
Install cost
What you actually take on by adding enhanced-resolve to a project.
Runtime packages this one declares itself.
Distinct packages in the full runtime tree, deduplicated the way a package manager would.
Unpacked size of this package plus its entire runtime tree.
Longest resolved dependency chain below this package.
Licenses in the dependency tree
Every license you inherit by installing enhanced-resolve, not just its own. Check this before a legal review, not after.
Compatibility
- Node.js
- node >=10.13.0
- Module format
- CommonJS only
- TypeScript
- Types included
- Install scripts
- None
Quick start
A usage example from the enhanced-resolve README.
const resolve = require("enhanced-resolve");
resolve("/some/path/to/folder", "module/dir", (err, result) => {
result; // === "/some/path/node_modules/module/dir/index.js"
});
resolve.sync("/some/path/to/folder", "../../dir");
// === "/some/path/dir/index.js"
const result = await resolve.promise("/some/path/to/folder", "../../dir");
// === "/some/path/dir/index.js"
const myResolve = resolve.create({
// or resolve.create.sync / resolve.create.promiseDependencies
Declared by enhanced-resolve v5.24.5. Runtime dependencies are installed with the package; dev dependencies are not.
Runtime (2)
Dev (16)
Used by
Popular packages that depend on enhanced-resolve.
Relationship graph
Dependencies (left) and dependents (right) of enhanced-resolve.
Frequently installed together
ECMAScript parser
TypeScript definitions for estree
Share target browsers between different front-end tools, like Autoprefixer, Stylelint and babel-env-preset
Lodash modular utilities.
React is a JavaScript library for building user interfaces.
React package for working with the DOM.
An AST-based pattern checker for JavaScript.
Prettier is an opinionated code formatter
Node's event emitter for all engines.
Delightful JavaScript Testing.
A library to create a trace of your node app per Google's Trace Event format.
WebAssembly binary format parser
Release history
25 releases in the last two years, typically about 6 days apart.
| Version | Published | Size | License |
|---|---|---|---|
| 5.24.5latest | 1 month ago | 410 KB | MIT |
| 5.24.4 | 1 month ago | 410 KB | MIT |
| 5.24.3 | 1 month ago | 406 KB | MIT |
| 5.24.2 | 2 months ago | 404 KB | MIT |
| 5.24.1 | 2 months ago | 401 KB | MIT |
| 5.24.0 | 3 months ago | 400 KB | MIT |
| 5.23.0 | 3 months ago | 375 KB | MIT |
| 5.22.2 | 3 months ago | 370 KB | MIT |
| 5.22.1 | 3 months ago | 368 KB | MIT |
| 5.22.0 | 3 months ago | 368 KB | MIT |
| 5.21.6 | 3 months ago | 366 KB | MIT |
| 5.21.5 | 3 months ago | 360 KB | MIT |
| 5.21.4 | 3 months ago | 360 KB | MIT |
| 5.21.3 | 4 months ago | 358 KB | MIT |
| 5.21.2 | 4 months ago | 358 KB | MIT |
Overview
enhanced-resolve is an npm package that offers a async require.resolve function. It's highly configurable. It is extremely widely used, with about 137.3M downloads per week and 1 known dependents in the graph. The latest version is 5.24.5, released under the MIT license.
Who should use it
Teams working in the npm ecosystem who need offers a async require.resolve function. It's highly configurable and value a battle-tested, widely-adopted solution.
When not to use it
Consider an alternative if you need to minimize your dependency tree, or if a more actively-maintained option better fits your npm stack.
Pros
- Large, well-established user base (137.3M weekly downloads).
- Ships TypeScript type definitions.
- Clear open-source license (MIT).
Cons
- Large dependency tree (18 direct dependencies) increases install size and audit surface.
Auto-generated from collected registry metadata. No external claims are inferred.
Frequently asked questions
Should I use enhanced-resolve?
Yes — enhanced-resolve scores well across adoption, maintenance, weight, supply chain, and licensing. 137.3M downloads per week and 1 known dependents. Last published 41 days ago. 25 releases in the last 2 years.
How do I install enhanced-resolve?
Run `npm install enhanced-resolve` to add enhanced-resolve to your npm project.
How many dependencies does enhanced-resolve have?
enhanced-resolve declares 18 direct dependencies and pulls in 2 packages in total once its runtime tree is resolved totalling about 514 KB on disk.
What license is enhanced-resolve released under?
enhanced-resolve is distributed under the MIT license. Its dependency tree also includes: ISC, MIT.
How popular is enhanced-resolve?
enhanced-resolve has approximately 137,299,333 downloads per week and 1 known dependent packages.
Is enhanced-resolve still maintained?
The most recent release of enhanced-resolve (v5.24.5) was published 1 month ago.
Does enhanced-resolve run install scripts?
No. enhanced-resolve does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.