</>PackageGraphPackageGraph

import-meta-resolve

npmv4.2.0TypeScript

Resolve things like Node.js — ponyfill for `import.meta.resolve`

Adopt with care

import-meta-resolve is usable, with caveats. Last published 376 days ago.

  • ?Adoption: grade ?, Not reported by this registry.

    No download data reported for this package yet.

  • CMaintenance: grade C, Fair — worth a look.

    Last published 376 days ago.

  • AWeight: grade A, Excellent.

    Zero runtime dependencies, about 77 KB installed.

  • BSupply chain: grade B, Good.

    This package has a single maintainer (bus factor of 1).

  • 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 import-meta-resolve to a project.

0
Direct dependencies

Runtime packages this one declares itself.

0
Total installed

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

77 KB
Install size

Unpacked size of this package plus its entire runtime tree.

Tree depth

Longest resolved dependency chain below this package.

Compatibility

Node.js
No constraint declared
Module format
ESM only
TypeScript
Types included
Install scripts
None

Quick start

A usage example from the import-meta-resolve README.

import {resolve} from 'import-meta-resolve'

// A file:
console.log(resolve('./index.js', import.meta.url))
//=> file:///Users/tilde/Projects/oss/import-meta-resolve/index.js

// A CJS package:
console.log(resolve('builtins', import.meta.url))
//=> file:///Users/tilde/Projects/oss/import-meta-resolve/node_modules/builtins/index.js

// A scoped CJS package:
console.log(resolve('@eslint/eslintrc', import.meta.url))
//=> file:///Users/tilde/Projects/oss/import-meta-resolve/node_modules/@eslint/eslintrc/lib/index.js
Example truncated — see the full README.

import-meta-resolve vs the alternatives

Packages solving a similar problem in the npm ecosystem, compared on the signals that drive an adoption decision.

PackageWeekly downloadsDependentsLicenseLast release
import-meta-resolvethis page03MIT1 year ago
resolve02MIT1 day ago
tsx61.9M26MIT1 day ago
resolve-cwd01MIT1 day ago
resolve-from08MIT1 day ago
is-core-module01MIT1 day ago

Dependencies

Declared by import-meta-resolve v4.2.0. Runtime dependencies are installed with the package; dev dependencies are not.

Dev (11)

@types/node ^24.0.0@types/semver ^7.0.0c8 ^10.0.0f-ck ^2.0.0prettier ^3.0.0remark-cli ^12.0.0remark-preset-wooorm ^11.0.0semver ^7.0.0type-coverage ^2.0.0typescript ^5.0.0xo ^1.0.0

Used by

Popular packages that depend on import-meta-resolve.

Relationship graph

Dependencies (left) and dependents (right) of import-meta-resolve.

mlly@wdio/utils@wdio/configimport-meta-resol…
import-meta-resolve dependencies dependents

Frequently installed together

Release history

1 release in the last two years, typically about 44 days apart.

Recent versions of import-meta-resolve
VersionPublishedSizeLicense
4.2.0latest1 year ago77 KBMIT
4.1.02 years ago76 KBMIT
4.0.02 years ago75 KBMIT
3.1.12 years ago76 KBMIT
3.1.02 years ago75 KBMIT
3.0.03 years ago76 KBMIT
2.2.23 years ago70 KBMIT
2.2.13 years ago70 KBMIT
2.2.03 years ago68 KBMIT
2.1.04 years ago63 KBMIT
2.0.34 years ago63 KBMIT
2.0.24 years ago63 KBMIT
2.0.14 years ago63 KBMIT
2.0.04 years ago61 KBMIT
1.1.15 years ago52 KBMIT

Overview

import-meta-resolve is an npm package that resolve things like Node.js — ponyfill for `import.meta.resolve`. It has 3 known dependents in the graph. The latest version is 4.2.0, released under the MIT license.

Who should use it

Teams working in the npm ecosystem who need resolve things like Node.js — ponyfill for `import.meta.resolve` and value a focused solution.

When not to use it

Consider an alternative if you need to or if a more actively-maintained option better fits your npm stack.

Pros

  • Ships TypeScript type definitions.
  • Clear open-source license (MIT).

Cons

  • No significant drawbacks detected from available metadata.

Auto-generated from collected registry metadata. No external claims are inferred.

Maintainers

Keywords

Funding

Frequently asked questions

Should I use import-meta-resolve?

import-meta-resolve is usable, with caveats. Last published 376 days ago.

How do I install import-meta-resolve?

Run `npm install import-meta-resolve` to add import-meta-resolve to your npm project.

What license is import-meta-resolve released under?

import-meta-resolve is distributed under the MIT license.

How popular is import-meta-resolve?

npm does not publish download counts. Within PackageGraph's crawl, 3 known packages depend on import-meta-resolve.

Is import-meta-resolve still maintained?

The most recent release of import-meta-resolve (v4.2.0) was published 1 year ago.

Does import-meta-resolve run install scripts?

No. import-meta-resolve does not define preinstall, install, or postinstall scripts, so installing it does not execute publisher-supplied code.