mrsum / webpack-svgstore-plugin

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

Sub-domain issue #178

Open Jeniczech opened 4 years ago

Jeniczech commented 4 years ago

Hello there, I am having problems with resolving the correct URL path for the SVG file generated by the plugin. When I upload my project to a standard domain, for example "http://frontend.devs.cz/" everything works just fine, but when I move my project one level further to "http://frontend.devs.cz/myproject", for example, the plugin ignores the "myproject" pathname and creates the following path for the SVG file that is incorrect: http://frontend.devs.cz/static/images/icons/icons.svg omitting the "myproject" part. Here are my settings: let __svg__ = { path: '../images/icons/**/*.svg', name: 'static/images/icons/icons.svg' }; require('webpack-svgstore-plugin/src/helpers/svgxhr')(__svg__); Please help.