@nodejs-loaders/deno-npm-prefix
v1.1.0
Published
Extend node to support a 'npm:' prefix via customization hooks.
Readme
npm: prefix loader for Node.js
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_modulesdirectory, so you must have the package installed.
