mrsum / webpack-svgstore-plugin

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

Allow passing path and name to plugin instead of in the function mark #143

Closed nddery closed 6 years ago

nddery commented 7 years ago

In our current setup, it is not possible for us to determine the path to the SVG files in a "browser" environment (from where the function mark lives). But we can from our webpack config file, so I've added a way to pass in both path and name directly to the plugin. If provided, they'll be used over the default, but can still be overwrited by the function mark - if that make sense. Because the context is set to where the function mark live, if passing the path directly to the plugin, it must be absolute and the context will be switch to an empty string.

lgordey commented 6 years ago

Tests are broken :(

lgordey commented 6 years ago

@nddery Please, feel free to reopen/recreate this