onwidget/qwind

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

Junkboy1 opened this issue · 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 <script> tags about google analytics and other .js for mailsform in php and everything doesnt work.

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