vite-plugin-svg-sprite icon indicating copy to clipboard operation
vite-plugin-svg-sprite copied to clipboard

Usage with app in body

Open jods4 opened this issue 3 years ago • 3 comments

Our app is mounted directly into the document <body>. Unfortunately, the <svg> spritesheet is already created at this point and gets wiped out by Vue, so icons don't work.

I can't change the app mounting point and put it into a child of <body>, do you have any advice how to make that setup work?

I was thinking maybe the runtime could be a Vue plugin that injects itself in the body after the app is mounted? For backward compatibility, this mode of runtime initialization could be optional and only needed when mounting in body directly.

jods4 avatar May 09 '21 17:05 jods4