</>PackageGraphPackageGraph

enhanced-resolve

npmv5.24.5TypeScript

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

2
Direct dependencies

Runtime packages this one declares itself.

2
Total installed

Distinct packages in the full runtime tree, deduplicated the way a package manager would.

514 KB
Install size

Unpacked size of this package plus its entire runtime tree.

1
Tree depth

Longest resolved dependency chain below this package.

Licenses in the dependency tree

ISCMIT

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.promise
Example truncated — see the full README.

Dependencies

Declared by enhanced-resolve v5.24.5. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (16)

@changesets/cli ^2.30.0@changesets/get-github-info ^0.8.0@codspeed/core ^5.2.0@types/graceful-fs ^4.1.6@types/node ^24.10.4cspell ^10.0.0eslint ^9.39.2eslint-config-webpack ^4.9.5husky ^9.1.7lint-staged ^17.0.4memfs ^4.56.11prettier ^3.7.4tinybench ^6.0.0tooling github:webpack/tooling#v1.26.4typescript ^6.0.2webpack ^5.107.2

Used by

Popular packages that depend on enhanced-resolve.

Relationship graph

Dependencies (left) and dependents (right) of enhanced-resolve.

tapablegraceful-fswebpackenhanced-resolve
enhanced-resolve dependencies dependents

Frequently installed together

Release history

25 releases in the last two years, typically about 6 days apart.

Recent versions of enhanced-resolve
VersionPublishedSizeLicense
5.24.5latest1 month ago410 KBMIT
5.24.41 month ago410 KBMIT
5.24.31 month ago406 KBMIT
5.24.22 months ago404 KBMIT
5.24.12 months ago401 KBMIT
5.24.03 months ago400 KBMIT
5.23.03 months ago375 KBMIT
5.22.23 months ago370 KBMIT
5.22.13 months ago368 KBMIT
5.22.03 months ago368 KBMIT
5.21.63 months ago366 KBMIT
5.21.53 months ago360 KBMIT
5.21.43 months ago360 KBMIT
5.21.34 months ago358 KBMIT
5.21.24 months ago358 KBMIT

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.

Maintainers

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.