Skip to content

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

@Junkboy1

Description

@Junkboy1

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions