How to publish a React component package, using NextJS as the compiler
Although your component library may not be making use of React Server Components and the like, it can be helpful to see how the component behaves in a NextJS context.
https://blacksheepcode.com/posts/publish_a_react_package_using_nextjs_as_a_base