Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

import-meta-resolve

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

import-meta-resolve

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

  • 2.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.3M
decreased by-3.16%
Maintainers
1
Weekly downloads
 
Created

What is import-meta-resolve?

The import-meta-resolve package provides utilities for resolving module specifiers in the same way that Node.js does for ES modules. It allows developers to programmatically resolve specifiers from the context of a specific file or URL, which can be useful for tooling that needs to understand module resolution, bundlers, and other development tools.

What are import-meta-resolve's main functionalities?

Resolving module specifiers

This feature allows you to resolve the full path of a module specifier from a specific context, typically the URL of the importing module. The code sample demonstrates how to use the resolve function to find the full path of 'some-module' as if it were being imported from the current module.

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

(async () => {
  const resolved = await resolve('some-module', import.meta.url);
  console.log(resolved);
})();

Other packages similar to import-meta-resolve

Keywords

FAQs

Package last updated on 11 Jun 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc