529 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
1
vote
0
answers
55
views
Webpack changes URLs in CSS during build: how to keep original relative paths in url()
I have a CSS file with a @font-face declaration where font paths are specified as url("./icons/tficons.woff2"). However, when building with Webpack, these paths get rewritten to url(../tflex-...
0
votes
0
answers
39
views
What can be used in place of compileType in the css-loader configuration for Webpack 5+?
I'm using Webpack 5+ and [email protected], postcss-loader @8.x but I've encountered an issue after upgrading. The compileType option, which was previously used in the css-loader configuration, is now ...
0
votes
0
answers
34
views
CSS modules - no properties in styles object
I have css-loader version 7.1.2 and according to their release notes, I have to structure my code as such:
In my component, I imported the style:
import * as styles from './mycomponent.module.less'
I ...
1
vote
1
answer
72
views
Converting LESS files to CSS modules
I am trying to convert a legacy codebase of LESS files to CSS modules.
I updated the webpack's css-loader to look like this:
{
loader: 'css-loader',
options: {
modules: {
// for now, ...
0
votes
0
answers
5
views
React-md package import bug in scss
I have a big project that uses ChartIQ.
In the past, we used react-scripts start for run the project
Now we are using react-app-rewired start for run with the ChartIQ implementation.
It's not a main ...
1
vote
1
answer
218
views
Webpack sass-loader not generating correct source maps
I have a webpack config which contains sass-loader. When i remove the sass-loader i can see properly generated source maps. But when i add sass-loader back sourcemaps are broken.
entry: {
...
1
vote
2
answers
210
views
Webpack not recognizing css-loader despite it being in config
for some reason webpack is not recognizing css-loader, despite it being in the config and being installed. Here is my webpack.config.json
const path = require('path')
module.exports = {
entry: './...
0
votes
0
answers
59
views
Giving complex names in css with webpack. But the classes in html do not change
I want to give complex class names in css with webpack, I have already done this. My current situation is that I import my css file to a js file and perform dynamic operations using the original names....
0
votes
0
answers
57
views
CSS modules is undefined while importing into react component
I am building a chrome extension utilizing react, webpack, tailwindcss and css modules.
But, when I try to import css modules into my react component, it turns out to be undefined.
src/InjectedPopup/...
0
votes
2
answers
795
views
Imported styles from scss module are undefined
I am using CSS Module and SCSS as my styling in my app, but when I import my styles as:
import styles from './landing.module.scss'
The imported styles is undefined.
I am using:
"css-loader":...
1
vote
0
answers
60
views
How to get url path for CSS at runtime?
I use CSS Modules.
I don't need resolving of url, but I need replace url paths with my custom function call so that I could get the full url at runtime by myself with my custom logic.
For example,
&...
1
vote
0
answers
702
views
"You forgot to add 'mini-css-extract-plugin' plugin" when work with thread-loader
Try to use thread-loader with mini-css-extract-plugin. When run npm build script, got error:
> cross-env NODE_ENV=production webpack
assets by status 958 bytes [cached] 1 asset
runtime modules 663 ...
2
votes
2
answers
759
views
style-loader does not recoginize default imports of CSS modules in storybooks
I am setting up UI Storybooks with its newer version of 8.1.4 but could not get the style-loader and css-loader to work in a compatible way such that CSS modules can be properly loaded into the canvas ...
3
votes
1
answer
661
views
Module.css loaded successfully but undefined
I imported data from module.css, however it is undefined.
import styles from "../css/basic-styles.module.css";
console.log(styles) // undefined.
My basic-styels.module.css has data
*{
...
1
vote
1
answer
654
views
I don't know how to configure the latest version of css-loader
Using the latest version of css-loader with Webpack 5.91.0, the imported CSS modules are always undefined when enabling cssModules. (This issue was resolved by downgrading css-loader to version 5.0.0.)...