Skip to main content

All Questions

0 votes
0 answers
41 views

React project from Vite to Webpack. Does not see css modules

There's a React project with Vite + TypeScript bundler, I'm in the process of migrating the project to Webpack. Everything seems fine except for an issue with CSS modules. It's as if they're not being ...
Ekaterina's user avatar
0 votes
0 answers
80 views

IntelliJ IDEA not recognizing custom CSS module class names with unique naming convention

I'm working on a project that uses custom CSS modules with a unique naming convention. I've configured my css-loader to generate class names in a specific way, and it's working correctly when ...
mmeqbel's user avatar
  • 100
0 votes
1 answer
1k views

Setup modules with Sass + CSS-Modules + Webpack + React + Ts

I have a trouble with getting types from my .scss files. I'm searching and trying to implement different configurations but nothing help. Basically, I'm trying to use modules in react app with TS. ...
Alex's user avatar
  • 29
0 votes
1 answer
168 views

CSS modules and 3rd party libraries

I looked for similar questions but nada. I have a case like this: We are developing a react webpack project which is using antd version 4 and also css modules .header .ant-menu { } this gives me: ....
Ozan Mudul's user avatar
0 votes
0 answers
75 views

Getting an error during webpack build while using CSS modules

Error 1 | // extracted by mini-css-extract-plugin 2 | export default {"lala":"hQupzgS9tEJmjp6wWbAk"}; (lala is classname) CSS modules is working fine and changes are reflecting ...
Vishwesh Bajpai's user avatar
1 vote
0 answers
172 views

How can I compile my React component's styles (JSX and CSS Modules) to be used statically — as a simple imported .css file?

Background I'm creating a public Node package which consists of some React UI. I'm currently using CSS Modules to scope the styles to the component, and it's all being successfully bundled with ...
Andrew Rubin's user avatar
0 votes
1 answer
766 views

css styles not applied CSS Modules react

I am using react-scripts: 5.0.1 with module.css files where I have my styles. One of my style files looks something like this. First I have to note that some module.css works fine. It seems the ...
Jason Krowl's user avatar
1 vote
0 answers
766 views

Is there a way to use CSS modules without adding .module. extension in NextJS?

I am trying to configure a NextJS project. I want to use CSS modules. However, I don't want to add *.module.* extension to file names and thus adding it to import paths, since it seems to me as ...
JakubMu's user avatar
  • 11
3 votes
1 answer
6k views

How can I import CSS Modules in a TypeScript file?

I've made some edits which are listed below. I am working with a combination of React (18.2.0), Typescript (4.8.4), and Webpack (5.75.0). I am attempting to add some styling to my application, and am ...
David's user avatar
  • 2,160
3 votes
0 answers
443 views

Storybook not append CSS Module styles of React component

I encountered an issue, the CSS Modules class name had generated, but the styles were not appended on HTML when I use storybook to render my React component. It means when I inspect all the DOM ...
AppleJam's user avatar
  • 1,039
0 votes
1 answer
1k views

Loading micro frontend root App component's CSS in singleSpaReact on mounting to the host application

colleagues! Need a piece of advice! Micro frontend in singleSpaReact does not load root's component CSS at the mounting, but only page CSS according routing navigation. Implemented a micro frontend ...
Alexf2's user avatar
  • 39
1 vote
0 answers
152 views

Value and class name with the same value - webpack - css-loader

I have the following component in react: component.js import styles from './styles.css'; const SomeComponent = (props) => { return <div className={`${styles["container"]}`}>Hey ...
Antonio Gamiz Delgado's user avatar
15 votes
4 answers
17k views

How to hash CSS class names in Nextjs?

How can I edit localIdentName field of css-loader in Webpack configuration in Nextjs so that I can hash/hide/obfuscate css class names? The example below is from the New York Times. Note the class ...
user9408899's user avatar
  • 4,422
0 votes
0 answers
87 views

I ejected my React app and configured it to use css modules for styling, but I keep on getting this error on npm start

I ejected my React app and configured it to use css modules for styling, but I keep on getting this error when I run npm start: /home/beckhamochieng/Desktop/React/react-complete-guide/config/webpack....
Beckham's user avatar
  • 13
7 votes
1 answer
5k views

CSS Modules + Ant design in ReactJs does not work

I am trying to use CSS Modules for CSS styling of my ReactJs project, for this I applied ant design documentation (see here: https://pro.ant.design/docs/style), however unfortunately it doesn't work. ...
saghar's user avatar
  • 143

15 30 50 per page
1
2 3 4 5
7