0

I have normal css file I would like to use in my React app which is not using webpack. When I try to import the css file, I get the below error:

Module parse failed: Unexpected character '@' (1:0)
You may need an appropriate loader to handle this file type.
> @import url("https://fonts.googleapis.com/css?family=Ubuntu:400,400i,700,700i");

Based on some posts that I have seen online, it looks like you have to webpack and customize it to load the css stylesheet. But is there a way to use my existing stylesheet without webpack ?

1 Answer 1

3

You can add the following line in between the <head> of your index.html instead...

<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Ubuntu:400,400i,700,700i">
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.