-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support bootstrap glyiphicons without hardcoding public path #207
Conversation
/** | ||
* Created by welchk on 7/20/16. | ||
*/ | ||
__webpack_public_path__ = window.location.protocol + "//" + window.location.host + "/"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where is this variable used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is dynamically sets the public path at runtime allowing proper resolving for loaders.
Found it in the issue for relative paths in style-loader
.
Further explaination: webpack-contrib/style-loader#96 (comment)
Honestly, I am not a fan of this outside of the fact that it does work. This will allow proper support icon support to fix #125, but it also does so in a way that does not cause other breaking changes as seen in #181 & #205.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see that webpack_public_path is a magic global.
I'd suggest renaming bootstrap-public-path to webpack-public-path and adding a comment inside that explains why its being set dynamically and includes a link to relevant issues and the docs that explain what webpack_public_path is.
Thanks so much for all your hard work on this Kyle! 💯
I can revert the bootstrap specific changes if you want to move forward with this. |
Great work Kyle! Thanks for all your help on this! 👍 |
So this removes the public path explicitly set causing issues (#181 & #205)
This is a very hacky solution in my mind.
Special Notes
I was able to run on external device, but I was not seeing bootstrap iconsre-tested and this works