An open API service indexing awesome lists of open source software.

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

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
```