css loader module for webpack
Questions tagged [css-loader]
516 questions
4
votes
2 answers
Webpack is importing CSS of other bundles
I have a Webpack setting to build different bundles and put all the CSS used by the bundle in a CSS file.
The problem is that Webpack is putting all the CSS of all the bundles together.
Mi project is configured in the following…

David Minaya
- 129
- 1
- 8
4
votes
1 answer
Sass use classname from other .scss file
goodday all,
I am trying to figure out if there is a way to link .scss in a way that they share their classnames.
So here is what I am trying to achieve.
|- theme
| |- theme_default.scss
|- snippets
| |-componentA
| | |-componentA.js
| | …

n247s
- 1,898
- 1
- 12
- 30
4
votes
0 answers
url rewriting not working with laravel-mix based on webpack.js. showing url([object Module]); in app.css
i am using laravel-mix as independent installation on my project for asset management.
when i run -npm run dev to compile webpack.mix.js then app.css file has formed in my output directory which is dist/app.css which is output code and below is…

Akshay patil.
- 87
- 9
4
votes
1 answer
Modify output of localIdentName / getLocalIdent
I am developing a widget, which can be embedded on "any" website and using the css-loader to give my CSS-class unique names to avoid conflicts.
In my webpack.config.js I have the following line:
localIdentName: 'productname-[folder]-[local]',
This…

rakete
- 2,953
- 11
- 54
- 108
4
votes
2 answers
css-loader returns undefined on importing css file
I have a css file named App.css which has css like
.abcd {
margin-top: 50px !important;
color: red !important;
}
I am importing this and using in my react app like
import styles from './App.css'
console.log("style", styles) // it gives…

varad
- 7,309
- 20
- 60
- 112
4
votes
0 answers
How can I automate my webpack build to auto escape data URIs in SASS and HTML files?
The issue I am facing is that firefox does not support # characters in data URIs. Chrome or Safari are totally fine with this.
Our UI guys have used a lot of inlining of SVGs and these all contain data URIS
for example in scss files:
content:…

Ranjith Ramachandra
- 10,399
- 14
- 59
- 96
4
votes
0 answers
how to make friends 'localIdentName' in css-loader with html files, using webpack?
I want to use webpack with css-loader with option 'localIdentName' and of course to use the hash of class names
but I'm not use React or a like libraries for DOM
my webpack rules
{
test: /\.scss$/,
use: [
{ loader: 'style-loader' },
…

Sergey Volkov
- 871
- 11
- 17
4
votes
2 answers
Nuxt.js: Module Error (from ./node_modules/eslint-loader/index.js):
I installed Nuxt starter template the recommended way:
npx create-nuxt-app fffff
Once inside fffff I installed css-loder (npm install --save-dev css-loader) then I launched the server: npm run dev
I got this error message:
> fffff@1.0.0 dev…

Billal Begueradj
- 20,717
- 43
- 112
- 130
4
votes
1 answer
Loading Sass and injecting CSS text into a parent document from a React app
I have a React app that's loaded into a parent document via some shim JavaScript that:
creates an