How to share asset in turborepo nextjs project
Unanswered
Round sardinella posted this in #help-forum
Round sardinellaOP
I used <img src="/logo.png" /> but its not work
Help me ! thanks
Help me ! thanks
15 Replies
Wait what do you want? Files from another package to go to your nextjs?
@Round sardinella I used <img src="/logo.png" /> but its not work
Help me ! thanks
I don't think it is even possible to share static assets in a monorepo
let me try to make a minimum repro
You could try with simlinks
It is possible to share static assets
but you can't do
/logo.pngyou will have to import it from the package itself
Yeah that is the best I could think (outside weird sinlinkng which... I dont trust)
1. The image is present inside the
2. The image is being used in page.tsx
3. The way of importing
ui folder2. The image is being used in page.tsx
3. The way of importing
here is the image at localhost:3001
ignore the text
TURBOREPOAlso note that the image's url will be a hash instead of clean (thus why need import then before)
Uhh maybe because he posted it in general and it now doesn't like crosspost