-
-
Notifications
You must be signed in to change notification settings - Fork 26.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
Fonts linked are linked to wrong path in production #1480
Comments
Thanks for filing, this is a known issue. Please track #1094 for updates. |
Hi Booli, As @gaearon said, there is a bug and the solution:
It's not officially supported. In my case (check #1487) I solved it transforming the absolute route to a relative route of the index file:
I repeate, this is a hack and it's not supported by CRA, but maybe it will solve your problem temporally. I tryed check it with your project but you have the route public/Images defined in the .gitignore file and I have a lot of 404 errors because the files doesn't exists 😞 Best regards. |
Perhaps this will be solved by #1489. |
Hi there! Please test it and don't hesitate to reach out if this doesn't solve your specific use case! |
Description
Links to fonts imported from CSS have wrong link in production CSS file.
Expected behavior
Imported fonts in CSS load correctly in production and are loaded from static/media
Tell us what you think should happen.
Actual behavior
Font files from CSS are linked to ./static/css/static/media and therefore 404.
line in generated main.css
@font-face{font-family:Mana;src:url(./static/media/mana.9e4b11ee.eot);
http://localhost:8080/static/css/static/media/mana.b561ddbf.woff Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/static/css/static/media/mana.059227ff.ttf Failed to load resource: the server responded with a status of 404 (Not Found)
Environment
react-scripts@0.8.5
v7.5.0
4.1.2
macOS El Capitan
Any Browser
Link to repo with error:
https://github.com/Booli/simmer
package.json
The text was updated successfully, but these errors were encountered: