Skip to main content
Filter by
Sorted by
Tagged with
2 votes
3 answers
537 views

How would I write and call this CSS in React CSS Modules? .is-invalid ~ .validationError { display: inline !important; } Calling styles.validationError does not work.
Leon's user avatar
  • 644
1 vote
1 answer
924 views

I want to use the babel-plugin-preprocessor to remove console.log() calls from my React application. My application was created using create-react-app and uses Typescript. I'm following the ...
Tom Regan's user avatar
  • 3,871
-1 votes
1 answer
163 views

I'm using babel-plugin-react-css-modules and need to pass classes via props to React components, as such: import "./style.css" // Works <div styleName="a" /> // Does not ...
Steve Bunting's user avatar
2 votes
1 answer
2k views

I trying to setup own simple webpack config with css-modules. And problem is that I getting different hashes by css-loader and babel css modules plugin in css classes names. const path = require("...
Ivan Bryzzhin's user avatar
3 votes
1 answer
3k views

When using webpack and babel together, one needs to configure both in order to use React CSS Modules. For example: webpack.config.js will need a rule like this: { // Translates CSS into CommonJS ...
Meglio's user avatar
  • 1,785
2 votes
0 answers
107 views

Is there a straightforward guide or step-by-step solution to config babel-plugin-react-css-modules with the create-next-app (v10+)?
jaisharx's user avatar
2 votes
1 answer
566 views

I'm trying to use babel-plugin-react-css-modules in existing React project. Most of components work just fine, however there is a problem with 'passing' style to child components. I have some parent ...
Hlib Bakai's user avatar
4 votes
0 answers
986 views

I am working on a react hook that will load styles from an (s)css module based on the props passed to a component. It looks something like this: import { useState, useEffect } from 'react'; export ...
Lukas's user avatar
  • 10.5k
1 vote
1 answer
3k views

I want to override a external module cssclass locally for a component In my code import `style` from './style.module.css' // this is local css module import `ExternalComponent` from '...
user8989's user avatar
  • 678
0 votes
2 answers
723 views

I have initialized a React Native app with the CLI quickstart. The only thing I have edited is that I use CSS Modules for styling the component (note: className in stead of style). I want to typecheck ...
Folkert Burghout's user avatar
2 votes
1 answer
525 views

material-ui: v4.8.2 react: v16.12.0 babel-plugin-react-css-modules with rtl app - I thought to use injectFirst but then I get a warning: Material-UI: you cannot use the jss and injectFirst props at ...
chenop's user avatar
  • 5,233
1 vote
1 answer
3k views

I want to use babel-plugin-react-css-modules to create unique class names, so I did a PoC: I ejected create-ract-app, then I add babel-plugin-react-css-modules to plugins in package.json: "babel": { ...
Radek Anuszewski's user avatar
0 votes
0 answers
756 views

I am working on a vue project and I made CSS as modules so that I can assign different class names to different elements. But the component containing the CSS module is rendering multiple times like: ...
zeeshan official's user avatar
4 votes
2 answers
2k views

I'm using scss modules in my react app but every time I change a styleName, I get the error Could not resolve styleName during hot reloading. If I don't have any corresponding styles for the styleName,...
jj008's user avatar
  • 1,123
0 votes
1 answer
1k views

I am currently developing a react project and in some cases have to extend CSS classes of frameworks like bootstrap with attributes. For example, I want to change the background color of this class (...
A. Fendt's user avatar
4 votes
2 answers
3k views

We are currently developing a react project using webpack and babel and would like to have automatically removed unused CSS classes in the CSS frameworks Bootstrap and AdminLTE 2 which we use. In the ...
A. Fendt's user avatar
4 votes
0 answers
744 views

The Issue Recently I have switched from the deprecated react-css-module to babel-plugin-react-css-modules to use CSS Module in a React project and encountered the issue that it is not able to resolve ...
codeful.element's user avatar
4 votes
1 answer
9k views

I really like the separation of className and styleName that babel-plugin-react-css-modules offers for global and local styles respectively, but have had some trouble getting the plugin to work with ...
Weardian's user avatar
  • 221
2 votes
0 answers
200 views

I'd like to turn the <label> in this div red: <div styleName="foo"> Some green text <label styleName="bar">Bar</label> </div> My associated SCSS file looks like: ....
LondonRob's user avatar
  • 79.9k
4 votes
1 answer
1k views

Most of my site is using Bulma classes for some of my global UI styling, and I'd like to continue to use those classes within my components, but also be able to define CSS Modules for those components ...
Esten's user avatar
  • 1,395
0 votes
1 answer
402 views

After using css-modules, the background-image in scss will not work. Please, How to configure it correctly? repo: https://github.com/pdsuwwz/Antd-app Error: ERROR in ./src/script/...
returnTrue's user avatar
4 votes
3 answers
1k views

I am using babel-plugin-react-css-modules. It add the styleName property to HTML elements. Typescript doesn't recognize this property. I am pretty sure I need to extend something but nothing I have ...
hipstersmoothie's user avatar
2 votes
1 answer
3k views

Pretty new to react and all that stuff, so I need some help here. I recently added the https://github.com/gajus/babel-plugin-react-css-modules plugin to my project. After some troubles I got it to ...
Twinfriends's user avatar
  • 1,997
4 votes
4 answers
2k views

I am trying CSS Modules for the first time with React and Webpack and I came across at least three ways to achieve it: css-loader react-css-modules babel-plugin-react-css-modules I went with babel-...
myTerminal's user avatar
  • 1,666
5 votes
0 answers
491 views

I am trying to start using react-css-modules w/ babel-plugin-react-css-modules. At present I have an electron-forge application running react. My .compilerc looks like the following: { "env": { ...
jordan.baucke's user avatar
2 votes
2 answers
2k views

I am trying to include another library's css for their component in my own application. For reference, I am trying to use this data table library: https://github.com/filipdanic/spicy-datatable. In ...
Chasen Bettinger's user avatar
1 vote
0 answers
239 views

I am trying to use babel-plugin-react-css-modules in a react app with webpack and SSR. However the aliased import statements shows Cannot find module error in webpack. If i use relative path for the ...
ravi yadav's user avatar
0 votes
1 answer
609 views

I am using babel-plugin-react-css-modules. This is my configuration isnide of webpack. devtool: 'source-map', { test: /\.local\.(css|scss)$/, use: [ 'style-...
Igor-Vuk's user avatar
  • 3,867
0 votes
1 answer
54 views

I'm sorry for asking what may be an obvious question to most, but I'm lost. I have created a react project with create-react-app. I want to add a third party library (Ant Design UI Framework) that ...
Canadian's user avatar
1 vote
0 answers
619 views

I'm using babel-plugin-react-css-modules and it seems to be creating the className/styleName, but for some reason it isn't outputting the CSS so that it can be read by the module. Here's my ...
Yazdog8's user avatar
  • 11
6 votes
2 answers
3k views

Please see https://github.com/gajus/babel-plugin-react-css-modules/issues/162 for full description of issue. Git repo = https://github.com/basher/react-no-webpack This is a simple POC / scaffold for ...
basherkev's user avatar
0 votes
1 answer
4k views

What do I do when I run across this? <div className="ui row myClass"> If myClass was the only class I would import the relevant style sheet and do this: <div className={styles.myClass}> ...
smuggledPancakes's user avatar
0 votes
1 answer
618 views

I have started to get the error since upgrade babel-plugin-react-css-modules from 2.8.0 to 3.3.2: > node ./server.js Listening at ipmc-dev11.be-md.ncbi.nlm.nih.gov:3000 Hash: a9c93503d372d94f4710 ...
ramusus's user avatar
  • 8,445
7 votes
1 answer
3k views

Issue I am trying to use babel-plugin-react-css-modules in my React project for better performance as opposed to React CSS Modules. However, the styles are being not applied correctly. Cause The ...
kavare's user avatar
  • 1,816
0 votes
1 answer
633 views

i try use @import is not working。 // a.less .hello{width:100px;height:100px;background:blue;} // index.less @import './a.less' // App.jsx import './index.less'; <div styleName="...
甘言川's user avatar
1 vote
1 answer
594 views

How do I pass a CSS module class name as a different prop than styleName? import './MyStyles.css' <ThirdPartyComponent styleName='this-works' activeClassName='i want to pass my css module ...
William Boman's user avatar
4 votes
0 answers
1k views

I'm trying to set up babel-plugin-react-css-modules for webpack 3.5.1 (ejected from create-react-app). This is my webpack.config.dev.js: 'use strict'; const autoprefixer = require('autoprefixer'); ...
Avery235's user avatar
  • 5,356
4 votes
2 answers
3k views

I have a component that makes use of CSS-Modules, by means of the babel-plugin-react-css-modules plugin. At some points during the lifetime of the component I want to be able to calculate new ...
Dimitris Karagiannis's user avatar