-
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 for fonts ttf, eot and woff. problem with the way that URLs a re resolved by Chrome when they're parsed from a dynamically loaded CSS blob #125
Conversation
…re resolved by Chrome when they're parsed from a dynamically loaded CSS blob
Nice find! Thoughts:
Note the explicit mimetype and use of url loader limits for efficiency. |
tnks @coryhouse I did the modification to the dev enviroment and add the url-loader dependency. I think is ready.. 💃 |
@coryhouse fix merge conflicts.. you think is ok now? |
Thanks for the PR and resolving the merge conflicts! 👍 |
@iLeonelPerea Do you have a simple example we can use to reproduce this? We may need to change the way we implemented this fix to resolve #205 |
@@ -17,7 +17,7 @@ export default { | |||
target: 'web', // necessary per https://webpack.github.io/docs/testing.html#compile-and-test | |||
output: { | |||
path: __dirname + '/dist', // Note: Physical files are only output by the production build task `npm run build`. | |||
publicPath: '/', | |||
publicPath: 'http://localhost:3000/', // Use absolute paths to avoid the way that URLs are resolved by Chrome when they're parsed from a dynamically loaded CSS blob. Note: Only necessary in Dev. |
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.
I thought for was dynamic, if you are already running you could be on 3002. Wouldn't there be conflicts with this? May want to consider using process.env.port
to cover that scenario.
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.
I know how to reproduce this. It because an error with bootstrap and using This PR does properly fix the issue, but it is causing a few others. I have a couple ideas, I will give them a try and report back. |
So... I don't want to throw in the towel, but these really don't play nice together. I tried a few different things but still have not had any luck to get both glyphicons and external access (#205).
Those are my notes, hopefully someone has an idea I have not already exhausted. Other things to consider:
|
This looks promising. webpack-contrib/style-loader#96 (comment) It is late will try again tomorrow. |
@kwelch Thanks for all the digging on this! A tricky one indeed. And yes, that last idea looks promising - it would be nice to avoid the public path complexity altogether. |
Agreed, the true fix would be for the I am not a huge fan of the hacky way mentioned in the bug thread, and first attempt last night was fruitless. |
Submitted. PR in this using the entry method from the |
A public path is added in webpack.config.js because of a problem with font loading. cf. coryhouse/react-slingshot#125
here the solution that I implemented for the issue with Chrome http://stackoverflow.com/questions/34133808/webpack-ots-parsing-error-loading-fonts