Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@nodejs-loaders/deno-npm-prefix

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@nodejs-loaders/deno-npm-prefix

Extend node to support a 'npm:' prefix via customization hooks.

latest
Source
npmnpm
Version
1.1.0
Version published
Weekly downloads
10
-64.29%
Maintainers
2
Weekly downloads
 
Created
Source

npm: prefix loader for Node.js

@node.js loaders logo

npm version unpacked size

Environments: dev, test

Compatible APIs: module.register, module.registerHooks

This loader enables loading modules using the npm: prefix in Node.js. This syntax is used most notably by Deno to import npm packages.

There is discussion within Node.js to introduce native support for this feature: nodejs/node#44492

Usage

After installing the loader and registering it with Node.js, you can use the npm: prefix to import modules from npm. For example:

import express from 'npm:express';

[!NOTE] The resolution still happens in the node_modules directory, so you must have the package installed.

Keywords

customization hooks

FAQs

Package last updated on 26 Feb 2025

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