DEV Community

loizenai
loizenai

Posted on

1

Style React Application – apply SCSS/CSS files to React with Webpack

https://grokonez.com/frontend/react/how-to-add-style-react-application-webpack

Style React Application – apply SCSS/CSS files to React with Webpack

In this tutorial, we're gonna look at how to style a React Application (apply SCSS/CSS files to React Application) with Webpack.

Related Posts:

Goal

We had created a React Application like this:

react-note-app-goal

Today we will know way to decorate it:

react-add-styles-example-result

How to

Install Packages

We need style-loader, css-loader, sass-loader, node-sass for applying CSS, SCSS file:


{
  ...
  "dependencies": {
    ...
    "style-loader": "0.20.3",
    "css-loader": "0.28.11",
    "sass-loader": "6.0.7",
    "node-sass":"4.8.3"
  }
}

Run cmd yarn install to add these packages to our application.

Configure Webpack

More at:

https://grokonez.com/frontend/react/how-to-add-style-react-application-webpack

Style React Application – apply SCSS/CSS files to React with Webpack

Image of Datadog

The Future of AI, LLMs, and Observability on Google Cloud

Datadog sat down with Google’s Director of AI to discuss the current and future states of AI, ML, and LLMs on Google Cloud. Discover 7 key insights for technical leaders, covering everything from upskilling teams to observability best practices

Learn More

Top comments (0)

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay