Access StencilJS component assets in React

Hello everyone!

I have a Stencil component using its own assets (images). After I build and publish to npm and install the package in my React app, the assets in the Stencil component won’t work anymore. React tries to find them in the public folder but they are not there: they are located at node_modules\stencil_project_name\dist.

Question: What’s the correct workflow to handle this situation?

Did you find a solution to this? I think I’m having a similar issue with my CSS variables defined in src/globals/variables.css.

I can include them in the dist/ build but the CSS doesn’t apply properly to the components.

I too have this question. Frustrating there doesn’t seem to be any decent solutions posted