[Bug] The SVGs in /build/svg/ don't have the `octicon` classes attached
fregante opened this issue · 2 comments
fregante commented
Describe the bug
The classes:
- ✅ show up in the SVG generated by
toSVG()
: https://github.com/primer/octicons/tree/main/lib/octicons_node#class - ✅ show up in the React components (line 65) https://www.unpkg.com/browse/@primer/octicons-react@19.8.0/dist/index.esm.js
- ❌ but they don't appear in the static SVGs: https://www.unpkg.com/@primer/octicons@19.8.0/build/svg/alert-16.svg
Expected behavior
Could you include the octicon octicon-something
classes in the built SVGs?
I only need this in @primer/octicons
, but the issue also appears in @primer/octicons-react
(however I don't understand the point of the built SVG files in that package since they're not allowed by the exports
map)
Context
I want to import the raw SVGs in my extensions
fregante commented
So this is because the icons are plainly copied from the ./icons folder, which understandably doesn't have any extraneous attributes.
This issue doesn't affect me anymore though, I'm using https://github.com/fregante/octicons-plain-react