I have an angular2 project which was created via angular-cli. In webpack there is a loader to load the svg sprite and also to generate that sprite from list of svgs. But how do I can use this functionality in my current project when angular-cli doesn't allow me to change webpack.config?
Thanks.
Use svg-sprite
1.
npm install --save-dev svg-sprite
2. Put your svgs in
src/svgs
3. Add
sprite-config.json
to your project root4. Add a script to
package.json
5. Add
@import
to your mainstyles.scss
6. Run script using
npm run sprites
Optional: create a build script
Add this to your scripts to build in one step