https://github.com/proohit/hybrid-package-json
A tool that creates ESM and CJS package.json files for hybrid npm packages
https://github.com/proohit/hybrid-package-json
Last synced: 4 months ago
JSON representation
A tool that creates ESM and CJS package.json files for hybrid npm packages
- Host: GitHub
- URL: https://github.com/proohit/hybrid-package-json
- Owner: proohit
- License: mit
- Created: 2022-11-16T10:11:39.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-11-16T10:46:42.000Z (over 3 years ago)
- Last Synced: 2025-09-29T14:19:36.990Z (9 months ago)
- Language: JavaScript
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
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
```sh
hybrid-package-json --esm-target=dist/esm --cjs-target=dist/cjs
```