score:3
You will need the following loaders :
style-loader
css-loader
less-loader
So basically a webpack config as follow :
module: {
rules: [
{
test: /\.less$/,
use: [
{
loader: "style-loader"
},
{
loader: "css-loader"
},
{
loader: "less-loader"
}
]
}
]
}
Check this answer to know what each loader does.
score:0
You might want to consider https://www.styled-components.com/. This library allows you to locate your stylesheet alongside with your react components. If I am correct, using this library won't change your current webpack config.
If you want a more "traditional" approach for styling your react application, you will need at least two loaders for your webpack config: style-loader and css-loader.
less and sass loaders will be required if you intend to use css-preprocessors though.
Source: stackoverflow.com
Related Query
- How to add styling to a React project
- How to add global loading/spin effect in axios interceptor for a React project
- How to add React components to existing Django project
- How To Add Service Worker In React Project
- How should I add Redux to a React project created with Create-React-App?
- how to add an Arrow icon inside my React Js Project
- How to Add styling to Image Component in React Konva
- How to add TypeScript 3.7 Optional Chaining support to create react app project
- How to add react to an existing express multipage project with ejs?
- How to programmatically add a className and a onLoad function to all the images in the project at once in React app without Jqyery
- How can i add meta tags for preview of a page in my blog react redux project
- How do I conditionally add attributes to React components?
- How do I add validation to the form in my React component?
- How do I use external script that I add to react JS?
- How to add SCSS styles to a React project?
- How to add strike through on Text in react native?
- How to apply CSS and Styling to a React component
- How do I add color to my svg image in react
- How to add a button in React Native?
- How to add sourcemap in React Native for Production?
- How to add "refs" dynamically with react hooks?
- How to upgrade a React project built with create-react-app to the next create-react-app version?
- How to add jsconfig.json to existing vscode project w/o breaking it
- How to add additional props to a React element passed in as a prop?
- How can I add multiple className's to react component?
- How can I remove unused imports/declarations from the entire project of React Typescript?
- How to add scroll event in react component
- How to add logical if statement when rendering React components?
- How can I add onKeyPress event to react material-ui textfield?
- How to update webpack config for a react project created using create-react-app?
More Query from same tag
- Issues adding additional entry point to webpack config (create react app)
- React.JS Validating Two Inputs
- React - Get the ref present in child component in the parent component
- Method PATCH is not allowed by Access-Control-Allow-Methods in preflight response
- React.js Increment and Decrement counter not mapping correctly
- static export in next js doesn't load when i reload the page
- React route to be render INSIDE another component
- Toggle visibility in Antd form
- React signup page syntax error at return of render function
- Creating React apps using npx create-react-app is very slow , Is there any way to speed it up?
- Update React input fields values on demand
- How to display some content for dates in react-calendar when you hover a mouse on dates
- Objects and Arrays in Javascript in React formatting
- Assets being served in development, but not production and getting "Uncaught SyntaxError: Unexpected token '<'"
- I get responsiveness issue only with my mobile
- ref from React.forwardRef is null
- Why is there no submit button in Ant Design Mobile?
- React/Javascript: Chaining together filters together
- How to declare types of props of SVG component? [React, TypeScript and Webpack]
- Why might a react app perform poorly in the layout rendering stage?
- How to embed external js code into React component
- How to render it using react js
- React scroll nav using useRef
- how to show different content when mapping over an array when less items
- Remove highlight on mouse leave in MUI Autocomplete
- react add setTimeout to loading
- why the normal counter runs only last setCount argument and functional counter runs all setCount?
- paragraph text does not wrap correctly when in a mobile view - (CSS)
- How to change background-color of menu when item is selected?
- Fetch data for the entire app without depending on component logic