Breaking changes between lucide-static@307
and lucide-static@308+
(package moved to ESM)
#2145
Open
2 of 15 tasks
Labels
💡 idea
New ideas
Package
Description
Hello,
I am not sure where to report this feedback but after upgrading
lucide-static
to the latest version I discovered that with the move to ESMlucide-static
received a breaking change.Indeed, before the ESM move the names of the exported icons variable where using
camelCase
however now they are usingPascalCase
.This created subtitle bug when someone is doing something like:
Note
It would be a must have if the variable name stay stable over time to avoid hard to debug bug. Or perhaps expose both camelCase and PascalCase names as an alias of each others for compatibility.
Another things that changed with the move to ESM is that now the icons strings have some additional whitespaces around the actual
<svg>
tags.This is a subtle changes but when passing that string to SVG.js it seems to be enough to break it. A workaround is to trim the string before passing it to
SVG.js
.Note
This could perhaps be considered a bug in SVG.js I am not sure what their position is on this subject.
These changes happened between:
Use cases
I am creating an eleventy plugin and providing a filter to user for bundling lucide-icons directly in the generated HTML (making load time faster).
And because of that, I am working with strings where the user if providing the name of the icon. This means that if the icon variable change casing then the plugin is broken as
lucideIcons["home"]
is different fromlucideIcons["Home"]
.Checklist
The text was updated successfully, but these errors were encountered: