@kaermorchen wrote:
Hello.
I support a small addon ember-mdi which store svg icons in one file
assets/icons.svg
and render svg icon somthing like<svg viewbox="0 0 24 24" width="24" height="24" role="img" class="mdi-icon mdi-icon-bug ember-view"> <use xlink:href="/assets/icons.svg#bug"></use> </svg>
But a tag
use
has some bugs in IE and Firefox. I want to change this structure and store svg data in js (maybe in vendor.js) file and render svg component like<svg viewbox="0 0 24 24" width="24" height="24" role="img" class=" mdi-icon mdi-icon-github-circleember-view> <path d="..."/> </svg>
I don’t understand how and where store svg data in js. I need to generate js file from svg and add it to vendor.js, but how? Should I use
treeForVendor
andincluded
hooks?broccoli-merge-trees
works just with real files or I may use in-memory file? I think to store data in a variablewindow._ember-mdi-icons
but maybe exist more right place?
Posts: 2
Participants: 2