Skip to content
This repository has been archived by the owner on Mar 18, 2023. It is now read-only.

use webpacks public path instead of window.baseUrl #109

Closed
ggarek opened this issue Sep 1, 2016 · 3 comments
Closed

use webpacks public path instead of window.baseUrl #109

ggarek opened this issue Sep 1, 2016 · 3 comments

Comments

@ggarek
Copy link
Contributor

ggarek commented Sep 1, 2016

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
Copy link
Contributor Author

ggarek commented Sep 1, 2016

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 ggarek changed the title use webpacks public path to resolve sprite relative url use webpacks public path instead of window.baseUrl Sep 10, 2016
@ggarek
Copy link
Contributor Author

ggarek commented Sep 10, 2016

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

@ggarek
Copy link
Contributor Author

ggarek commented Oct 5, 2017

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

@ggarek ggarek closed this as completed Oct 5, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant