Socket
Book a DemoInstallSign in
Socket

package2esm

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

package2esm

convert your dependency to esm

latest
Source
npmnpm
Version
1.0.2
Version published
Maintainers
1
Created
Source

package2esm

Convert packages in node_modules to ESM, suitable for packages that do not have ESM support but require the use of ESM.

Usage1

# install
npm install package2esm -g

# use1
p2esm [xxx] 
# such as p2esm @netless/slide

# copy node_modules and convert to esm, and write to the specified directory, default is ./esm
p2esm -ac

When used as a global npm package, it usually implies that the project is for personal use. Installation of package2esm is required only if specified in the project's readme document.

Usage2

and you can use it in your project

npm install package2esm -D

and update your package.json scripts such as

{
  "scripts": {
    "dev": "node src/index.js"
  }
}

to

{
  "scripts": {
    "dev": "p2esm @netless/slide && node src/index.js"
  }
}

Contribute

Welcome to contribute, I am coding best, welcome to judge

Keywords

convert-esm

FAQs

Package last updated on 09 May 2024

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