iconify/tools

customize the exports field of the package

SKT1yang opened this issue · 3 comments

When I was using the exportJSONPackage API, I encountered a situation where I needed to customize the exports field of the package (add a types). I found that this is fixed, and would like to optimize it or have other considerations? Please let me know

I'm not sure what you want to optimise there. If you want to add custom stuff to package.json, there is package option that you can use to add custom stuff.

I'm not sure what you want to optimise there. If you want to add custom stuff to package.json, there is package option that you can use to add custom stuff.
Thank you for your reply. It's not a custom field. I know it can be implemented so far. I mean the complete customization of the exports field. I think this is fixed in the source code and cannot be changed by the user

Sorry for huge delay, completely forgot about this issue.

In next version added callback to options: customisePackage, which is ran before package.json is written. First parameter is contents of package.json as object, which you can customise.