Closed advename closed 6 years ago
If we can support development of a plugin by improving the API or making certain parts of the injection accessible from the outside, we should consider doing so. But a whole plugin for ParcelJS or webpack is outside the scope of this project IMHO.
Also, there is a fundamental problem with IDs and pre-inlined SVGs in dynamic webpages. One of the features of SVGInject is that IDs are made unique during the injection in order to avoid IDs conflicts in the DOM. If the same SVG is added multiple times dynamically, ID conflicts would be inevitable with pre-inlined SVGs, because the SVG with fixed IDs would be hardwired into the code and inserted each time using the same IDs.
Agree, this is outside the scope of this project. Closing this issue.
I'm also wondering if it's possible to make the SVG-inject available as a plugin for a bundler (e.g. ParcelJS) and upon bundling, the svg's are already injected.
This would be a big advantage as the bundled files already contain the SVG, and we don't need to use SVG-inject anymore to inject them every time.