qwind icon indicating copy to clipboard operation
qwind copied to clipboard

[vite]: Rollup failed to resolve import - Trying to use images that are in /public/images/image.png

Open Junkboy1 opened this issue 2 years ago • 1 comments

Hello Im Trying to use images that are in /public/images/image.png I do the import as

import logoSrcDark from "/images/LogoOpthormDark.png";

Then I get this failure:

image

I tryed a lot.. even ./images ../images just /images or just /image.png etc.. Nothing works..

Same for scripts in root.tsx I set some

Junkboy1 avatar Jun 01 '23 00:06 Junkboy1

try with ~ for Vite to understand import logoSrcDark from "~/images/LogoOpthormDark.png";

ThuKieuIC2 avatar Aug 24 '23 03:08 ThuKieuIC2