mrsum / webpack-svgstore-plugin

Simple svg-sprite creating with webpack
https://www.npmjs.com/package/webpack-svgstore-plugin
200 stars 92 forks source link

Provide example from local folder #136

Open ssbyoung opened 7 years ago

ssbyoung commented 7 years ago

Hey,

I'd really like to be able to use this in a project I'm working on. However, since the update to the latest version I can't seem to find an example where this is loading from a local folder. It seems to me like the current example is pointing at a CDN for your svg files (hence the Put function mark at your chunk text).

What I'd like to do is pull down my svgs from a repository and then point this plugin at the downloaded SVGs. Then, as a part of my webpack build, I'd like to get a full sprite sheet.

Is this possible with this plugin? If so what's the easiest way to do that with this current version?

zoopoetics commented 7 years ago

Same here. I'm trying to upgrade from 2.1.4 to 4.0.0 and I can't seem to get the new version working at all. This was our previous config:

new SvgStorePlugin( 'static/images/svg-store/**/*.svg', 'images', { name: 'store.svg', prefix: 'svg-icon-', } ),

It's not at all clear how you would accomplish this with the latest version, or if indeed you even can. Examples would be much appreciated.

jarodtaylor commented 7 years ago

It's unfortunate because gulp/grunt-svgstore plugins are so easy to use and the documentation is very straightforward. This plugin gets almost 1000 downloads a day and you'd think there'd be more examples out there.

racamp101 commented 7 years ago

does someone have the solution for this?