Skip to content

Custom html attributes resolving #5098

@putnikproj

Description

@putnikproj

Clear and concise description of the problem

In vanilla template, html file vite automatically resolves the src attribute of the img tag and other attributes. But what if my project has lazy-loading for images. I should write, for example, data-src attribute in the img tag. But vite doesn't understand, that this is a file's url, it doesn't resolve it, and doesn't put it into dist folder.

Suggested solution

Make some plugin or option, like webpack html-loader. It can "...specify which tags and attributes to process, filter them, filter urls and process sources starts with /".

Alternative

No response

Additional context

No response

Validations

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions