package2esm
Convert packages in node_modules to ESM, suitable for packages that do not have ESM support but require the use of ESM.
Usage1
npm install package2esm -g
p2esm [xxx]
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