Build JS package with ease, package.json as configuration
npm install --save-dev bunchee typescript
Create entry files of your library and package.json
.
$ cd ./coffee
$ mkdir src && touch ./src/index.ts
Add the exports in package.json
.
{
"name": "coffee",
"type": "module",
"main": "./dist/index.js",
"scripts": {
"build": "bunchee"
}
}
$ npm run build
$ Exports File Size
$ . dist/index.js 5.6 kB