Roboto Font typeface-roboto css is not handled by loader #544

Closed
opened 2025-08-09 17:16:42 +00:00 by fergalmoran · 0 comments
Owner

Originally created by @tonven on 7/27/2017

Hi.
Tried to use type Roboto Font in default react redux template.
Installed it with npm install typeface-roboto --save.
And imported it in layout class.
import * as React from 'react'; import { NavMenu } from './NavMenu'; import 'typeface-roboto';
But when an application loads, I get the following error:
Web\node_modules\typeface-roboto\index.css Unexpected character '@' (2:0)
You may need an appropriate loader to handle this file type.
| /* roboto-100normal - latin */
| @font-face {
| font-family: 'Roboto';
| font-style: normal;

In webpack config there is a line that should handle css:
{ test: /.css$/, use: ExtractTextPlugin.extract({ use: isDevBuild ? 'css-loader' : 'css-loader?minimize' }) },

What should I do to fix it?

Thank you in advance.

*Originally created by @tonven on 7/27/2017* Hi. Tried to use type Roboto Font in default react redux template. Installed it with npm install typeface-roboto --save. And imported it in layout class. `import * as React from 'react'; import { NavMenu } from './NavMenu'; import 'typeface-roboto';` But when an application loads, I get the following error: Web\node_modules\typeface-roboto\index.css Unexpected character '@' (2:0) You may need an appropriate loader to handle this file type. | /* roboto-100normal - latin */ | @font-face { | font-family: 'Roboto'; | font-style: normal; In webpack config there is a line that should handle css: { test: /\.css$/, use: ExtractTextPlugin.extract({ use: isDevBuild ? 'css-loader' : 'css-loader?minimize' }) }, What should I do to fix it? Thank you in advance.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/JavaScriptServices#544
No description provided.