Questions tagged [css-loader]

css loader module for webpack

516 questions
0
votes
1 answer

Bootstrap css issue - Overwriting to new class name

I am building a my new App with React Starter from following Git Repo : https://github.com/alicoding/react-webpack-babel Some reason, everytime I have a new class in "index.scss" It generated as weird new class name. For Example , If I wrote new…
Danny Kim
  • 809
  • 1
  • 7
  • 15
0
votes
1 answer

How to use webpack and css-loader to load only specific css class?

I'm using webpack, I have installed both style-loader and css-loader styles.css body { font-family: Arial; color: white; } .foo { color:blue; } .bar { color:red; } entry.js require('!style!css!./styles.css'); var css =…
Artisan
  • 4,042
  • 13
  • 37
  • 61
0
votes
1 answer

Error implementing sass-loader webpack

I am currently trying to get sass working with my webpack application. I have had success with configuring style-loader & css-loader. However, when I try and implement sass-loader I receive the following error: bundle.js:598 Uncaught Error: Cannot…
Nappstir
  • 995
  • 2
  • 20
  • 38
0
votes
1 answer

Angular2 webpack and css loader

I have a problem with angular 2 and webpack. The problem is that if I use relative paths in my css file like "background: url("./../images/squares.gif") center left no-repeat;" I get errors when I build the app: "15% 19/206 build…
Egor
  • 2,122
  • 2
  • 21
  • 23
0
votes
0 answers

css-loader failed when include added in webpack.config.js

I have a webpack.config.js file as blow: let webpack = require('webpack'); module.exports = { entry: './src/test.css', output: { path: "dist", filename: "app.js" }, module: { loaders: [ { test:…
BD-Joy
  • 115
  • 8
0
votes
1 answer

Webpack setup, webpack doesn't resolve(pack into bundle) css files

I have problem inserting css inside my react code. Problem is that webpack not resolving css files. I did everything according to docs, and no luck. Also could be issue that i'm using django 1.9 for this File structure: webpack.config.js static ├──…
Ievgenii
  • 3
  • 1
  • 2
0
votes
1 answer

Webpack bootstrap.css npm module fails parsing with ExtractTextLoader + css_loader

I am learning to use node as a front end build tool and am struggling with including bootstrap into a css bundle file to include within a web page. I have a loader for LESS and a loader for CSS, as well as loaders for FONTS, and requiring any of…
Rimer
  • 2,054
  • 6
  • 28
  • 43
0
votes
0 answers

Webpack: generate separate stylesheets per theme

I am using CSS modules to conditionally load the top-level stylesheet (stylus). This works fine when I am running webpack-dev-server, but I am trying to generate 2 CSS files: theme1.css and theme2.css. Here is the top-level index.js file. export…
Abe
  • 6,386
  • 12
  • 46
  • 75
0
votes
1 answer

Webpack bundle returns 'Cannot find module' for CSS

I have an app which folders are structured like this: /app/ |- /assets/ | |- /css/ | |- myapp.css |- index.html |- index.js /dist/ /node_modules/ .babelrc package.json webpack.config.js myapp.css is a simple, plain…
0
votes
0 answers

Webpack optimize-minimize breaks gradients in Firefox?

I have a simple landing page and I used webpack. If I run webpack with -p flag which stands for -optimize-minimize it will break css gradients in Firefox. Instead of smooth color change I see harsh stripes. Under the hood css-loader using cssnano…
Vlad Miller
  • 2,255
  • 1
  • 20
  • 38
0
votes
1 answer

How to use global stylesheet with css loader

I try to figure out how to import/require global css which includes styles for tags like body and so. I use css-loader + style-loader with extract text plugin.. I noticed the :global selector but didn't know where exactly I should put the global.css…
barbenezra
  • 47
  • 1
  • 10
0
votes
0 answers

Why webpack output local css before boostrap css?

My app uses bootstrap css and local custom css. The problem is webpack's output included some local css before bootstrap css and some come after it, although all my app imported local css after bootstrap. Is there a way to put all custom css after…
sglai
  • 307
  • 4
  • 10
0
votes
1 answer

Configuration for enabling hot style-loader in Webpack for syncing css

I'm trying to enable hot style-loader in Webpack but I can not find the right configuration for it. Here's my webpack.config.js: const webpack = require('webpack'); const path = require('path'); const buildPath = path.resolve(__dirname,…
Mehran
  • 15,593
  • 27
  • 122
  • 221
0
votes
0 answers

Missing ! causing "Module not found" - webpack

I have node application that is using webpack bundler. Everytime I try to budle it, I get this error: Error: Cannot resolve module 'test/qfla-server/node_modules/style-loader/addStyles.js' in /home/backman/!test/tta/app/renderer resolve module…
pfulop
  • 1,009
  • 13
  • 24
0
votes
1 answer

Webpack CSS loader won't parse comments

I'm using react starter kit and I'm trying to import the SCSS files from bootstrap (installed via NPM) and it's complaining about the comments: ERROR in…
user1775718
  • 1,499
  • 2
  • 19
  • 32
1 2 3
34
35