mikeal / ipjs

Universal JavaScript Build and Packaging
41 stars 4 forks source link

feat!: add optional --main for `build` to include "main" #8

Closed rvagg closed 3 years ago

rvagg commented 3 years ago

Don't include "main" in package.json by default, but include it if --main is passed.

This winds back #7 to make inclusion of "main" an optional step if you provide a --main argument. esbuild has included "exports" support in 0.9.0, making this a little less critical I think since we now have very broad export map support. 🤞. Including a "main" broke TypeScript support in https://github.com/multiformats/js-multiformats - it's fixable, but it illustrates how fragile this all is so making it optional seems like a good idea.