css loader module for webpack
Questions tagged [css-loader]
516 questions
0
votes
2 answers
Can't use bootstrap with webpack
Using Express, Webpack and Bootstrap. I'm using css-loader for stylesheets.
Here's my webpack.config.js:
const path = require("path");
config = {
"entry": "./modules/entry.js",
"output": {
"path": path.resolve(__dirname, "public"),
…

Jakov
- 720
- 1
- 12
- 29
0
votes
1 answer
How can I import imported files with postcss-import and Webpack 2?
Can I use postcss-import for importing Bootstrap?
Here is a part of my webpack config:
{
test: /\.css$/,
loaders: [
{
loader: 'style-loader',
},
{
loader: 'css-loader',
options: {
importLoaders: 1,
…

Entry Guy
- 425
- 1
- 7
- 18
0
votes
1 answer
webpack css-loader does not load some paths
I am trying to import a CSS file in my React project like so:
import 'react-select/dist/react-select.css';
and this fails with an error:
ERROR in ./node_modules/react-select/dist/react-select.css
Module parse failed:…

kurtgn
- 8,140
- 13
- 55
- 91
0
votes
1 answer
Error when trying to work with css-loader
While developing with Reactjs, I have problem with css-loader. Basically, this is my webpack.config:
{
test: /\.css$/,
exclude: /node_modules/,
loader:…

odarino
- 62
- 4
0
votes
1 answer
How to include all CSS files in node_modules to be built by css-loader?
I am trying to extract all the CSS files found in the node_modules directory into a single file. My Webpack config is as follows:
{ // node_modules css in /node_modules/**/*.css
test: /\.css$/,
include: /node_modules/,
// extract to…

Colby Cox
- 1,639
- 2
- 10
- 16
0
votes
1 answer
In Webpack 3 how can I generate a different CSS URL when built?
I am trying to output a different URL for my background images when my project is built.
My current CSS image path is:
./src/components/assets/images....
What I want when built:
/images/default-source/images/icon.png
I have tried different things…

Rob Fyffe
- 719
- 1
- 8
- 22
0
votes
1 answer
css-loader import is not working properly
I am using Webpack to create bundles for my react application. I am using postcss and css-loader to load CSS files. In my app, css import is not working properly. I am trying to import every thing in my Main.css file, but webpack throws error by…

Bharat Soni
- 2,824
- 6
- 23
- 48
0
votes
0 answers
extract text plugin - Module build failed: ModuleNotFoundError: Module not found:
I'm using the following module in my webpack config -
{
test: /\.css$/,
use: ExtractTextPlugin.extract({
fallback: "style-loader",
use: [
{
loader: "css-loader",
options: {
modules: true,
…

Finnnn
- 3,530
- 6
- 46
- 69
0
votes
1 answer
Trying to use webpack in my react app. Getting a "error Command failed with exit code 2."
I have been trying to follow a couple of tutorials to install webpack so i can get more customized packages loaded into my react app.
this is my package json file
{
"name": "client",
"version": "0.1.0",
"private": true,
"main": "index.js",
…

jdip88
- 427
- 2
- 9
- 23
0
votes
1 answer
Webpack throws TypeError: Super expression must either be null or a function, not undefined when importing LESS file
I have the following in a file initialize.js:
import App from './components/App';
import './styles/application.less';
document.addEventListener('DOMContentLoaded', () => {
const app = new App();
app.start();
});
In webpack.config.js I…

Danziger
- 19,628
- 4
- 53
- 83
0
votes
1 answer
css-loader will not import css into node anymore, throwing error
Originally, I had an index.html page with a div containing a

wizeOnes
- 119
- 16
0
votes
2 answers
Compiled Sass has weird changed class names Webpack 2 ExtractTextPlugin
So I have this code below in my webpack 2 config. It seems to work other than it is altering my css class names.
modules:
test: [/\.scss$/, /\.sass$/],
loader: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: [
{
loader:…

allencoded
- 7,015
- 17
- 72
- 126
0
votes
1 answer
Add styles in Webpack css-loader without localIdentName on specific classes
I'm using webpack url-loader to load css files and access them via CSS modules. These styles are transformed like this shared-assets-_nav---nav---JLuu1 ul > li > a.
How do I change styles for unhashed styles which are added by libraries? I.e. React…
user7629762
0
votes
2 answers
CSS module not working on react component
I am trying to use css module in my reactjs application. I have added the loader in webpack.config file.
{
test: /\.css$/,
loader:…

EdG
- 2,243
- 6
- 48
- 103
0
votes
1 answer
react-icheck: css-loader fails with error: Module not found: Error: Can't resolve 'minimal/minimal@2x.png'
I am trying to use this front-end library react-icheck (a port of the icheck.js jquery plugin into react) into my react application setup with webpack 2. This is the error I get when I run npm start:
Module not found: Error: Can't resolve…

TheSoul
- 4,906
- 13
- 44
- 74