I would like to develop a UI library using React (without CRA) with Webpack 5, Ts, Storybook, and Third Party Libraries and publish to NPM, and parts of the library components should know how to render SVG as props from the consumer app or in the design of the component.
I saw a couple examples, and they made me very confused. The different guides that I follow build a simple component called a button, and publish it to NPM.
In the first guide, the components were created, then compiled with TS, exported to NPM, and used in a React app created with CRA.
In the second guide, Webpack was used to create the dist folder, then it was published to NPM. And he imported the Button components and used them without any issues.
If you could share with me any knowledge from your experience, what kind of problems can come up, thanks.