Answer the question
In order to leave comments, you need to log in
WebPack: how to set up including SVG files so that they are collected as inline-SVG?
The task is to manage SVG icons through CSS. Decided to include icons as inline-SVG. I use Jade + Stylus in the project. Now I connect it as follows:
1. Manually copy the contents of icon.svg into a special file for icons icon.jade, removing unnecessary tags and translating the SVG syntax into jade syntax.
2. I include the icon.jade file in index.jade via include
3. I enjoy the lost time :( Of
course, this is a crutch, everything works, but maybe there is a "human" way? I found https://github.com/sairion/svg
from existing solutions -inline-loader
But it didn't work out of the box.
Answer the question
In order to leave comments, you need to log in
You can put a link to the required css at the beginning of the svg file
<?xml-stylesheet href="style.css" type="text/css"?>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question