Skip to content

Move all hass: icons to @mdi/js imports #6139

@bramkragten

Description

@bramkragten

The request

We no longer do anything with the hass prefixed icons since we lazy load icons. We treat them the same as normal mdi icons. This means we download a icon chunk and cache in the db, and that we fetch from the db on all hass icons.

We should import the icons we use ourselves, that means we can code split them and load only what we need for the specific page.

The alternatives

Keep it like it is now.

Additional information

from:

<ha-icon icon="hass:icon-name"></ha-icon>

to:

import { mdiIconName } from "@mdi/js";
<ha-svg-icon .path=${mdiIconName}></ha-svg-icon>

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