-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Description
Hey @vrimar
The feather icon pack contributes 50kb of weight to distribution bundles, I'm having trouble tree-shaking those imports. The JSON Mapping of svg contents provided via feather seems the cause. Providing Icons contents as a series of exports would allow svg contents to be cherry picked when bundling for production, I noticed the current approach it to map icon contents to property value but mapping to a vnode would be just as effective, eg:
// some defaults
const some defaults = { viewBox:'0 0 24 24' }
export const icon = (attrs = {}) => m('svg', { ...attrs, ...defaults }, m.trust('d="M0 27.73v27."'))
export const another_icon = (attrs = {}) => m('svg', { ...attrs, ...defaults }, m.trust('d="M0 27.73v27."'))Are PRs welcome on the project?
Metadata
Metadata
Assignees
Labels
No labels