hybrid-package-json
v0.0.1
Published
A tool that creates ESM and CJS package.json files for hybrid npm packages
Downloads
120
Readme
hybrid-package-json
This tool is used to generate package.json
file for a hybrid ESM/CJS package. Specifically, it defines the type
field to module
for ESM and commonjs
for CJS and copies it to a target location so that consumers can use either ESM or CJS. It uses the root package json by default.
Usage
hybrid-package-json --esm-target=dist/esm --cjs-target=dist/cjs