mrsum / webpack-svgstore-plugin

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

use webpacks public path instead of window.baseUrl #109

Closed ggarek closed 6 years ago

ggarek commented 8 years ago

As for version 3.0.3 there is a problem with resolving sprite paths at runtime. It is necessary to consider webpack's public path at runtime to build a proper url for current runtime environment. The path can be accessed as __webpack_public_path__ in the chunk entry file.

It is the case when the asset path is not known statically (at build time) rather at runtime.


This #106 may be related issue, but it is not about webpack, but some plugin (vuejs loader i guess). Because webpack does not have assetsPublicPath.

ggarek commented 8 years ago

i think this fix makes window.baseUrl magic redundant. But it is also a breaking change, so it must be mentioned in the change log.

ggarek commented 7 years ago

Renamed the issue, because it is all about using public path provided by webpack in runtime instead of another global variable.

ggarek commented 6 years ago

The PR was merged. There is no need to set window.baseUrl anymore.