question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Load font (Semantic-UI React)

See original GitHub issue

Hey,

I’m tried to use CRA with Semantic UI React

http://react.semantic-ui.com/

Everything is good, but ONE feature doesnt work : the Icon. Webpack can’t load .woff and .ttf.

Here’s my error with Firefox :

"downloadable font: invalid version tag (font-family: "Icons" style:normal weight:normal stretch:normal src index:2)
source http://localhost:3000/themes/default/assets/fonts/icons.woff

downloadable font: rejected by sanitizer (font-family : "Icons" style:normal weight:normal stretch:normal src index:2)
source http://localhost:3000/themes/default/assets/fonts/icons.woff"

I have the same error but with *.ttf files.

I suppose that with CRA, you can’t add new loaders to Webpack right ?

Any ideas ?

Thanks a lot.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
c0d3xcommented, Nov 30, 2017

You also get this issue if you import font-awesome to a create react app. Problem is that webpack needs this line of code to support WOFF, WOFF2, EOT, TTF and OTF font file types. { test: /.(woff|woff2|eot|ttf|otf)$/, use: [‘file-loader’], }, Please make an option to extend the webpack config in some way… Like angular have the angular.config file also should you make a react.config file to handle issues.

0reactions
fgiarritiellocommented, Jul 17, 2018

@c0d3x any way to do this without ejecting?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Theming - Semantic UI React
Theming with Create React App · Remove existing styles · Install required dependencies · Scaffold custom styles · theme.config · Last but not...
Read more >
Use a different font in Semantic-UI | by Yuki Yao | Medium
Here is how I did it. To get the title and a couple of headers use font Montserrat. I simply did it with...
Read more >
Customizing Semantic UI React font-family, but can't find src ...
The only way to change that font would be to recompile your own CSS. It sounds like you are importing the Semantic UI...
Read more >
Semantic-UI-React icon-font issues when using React-Router ...
setup Meteor 2.5.0 with React frontend Semantic-UI-React (SUIR) React-Router v6 (same issue with v5) Issue When loading the app on a second ...
Read more >
semantic-ui-react - npm
The official Semantic-UI-React integration.. Latest version: 2.1.4, last published: a month ago. Start using semantic-ui-react in your ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found