my-component-library
my-component-library copied to clipboard
feat: add subpath exports
This adds subpath exports to the package.json and a script to generate them. This allows people to import only 1 module which is ideal for bundlers like Vite especially when dealing with libraries that have dependencies only for some components but not for others. Using subpath imports users of the library do not need all dependencies but only those that get imported in the files that they import.
(commits gpg unverified because I did this quick and dirty mode from GH codespace)