egoist / tsup

The simplest and fastest way to bundle your TypeScript libraries.
https://tsup.egoist.dev
MIT License
8.46k stars 208 forks source link

Bundling Assets for React Native component #1097

Open limaho opened 3 months ago

limaho commented 3 months ago

Hi, I am using tsup to build a react native component. Everything works fine, except Images. While developing I can use images and render them into the Image component.

import logo from '../assets/images/logo.png' when running the library as a standalone but once bundled using tsup and added to another project, the the image no longer loads correctly

I tried with --publicDir to copy all my assets into dist but still is not working.

Any advice? Thanks

cc @egoist

Upvote & Fund

Fund with Polar

du5rte commented 3 weeks ago

Hi @limaho, I'm curious what your setup is, I've been trying to do the same but hasn't worked for me