Questions tagged [webpack-style-loader]
461 questions
0
votes
0 answers
webpack : can't resolve typeahead in app.js
I am using ES6, typeahead & webpack for my project.
Below is my webpack config file:
var path = require("path");
var HtmlWebpackPlugin = require('html-webpack-plugin');
var HtmlWebpackExcludeAssetsPlugin =…

Samir
- 691
- 5
- 22
0
votes
1 answer
Loaders failing in Webpack 2. They work separately, but fail when both are included in config file
I have the following in my webpack.config.js file:
const webpack = require('webpack');
const path = require('path');
const config = {
context: path.resolve(__dirname, 'src'),
entry: './app.js',
output: {
path: path.resolve(__dirname,…

echessa
- 49
- 2
- 8
0
votes
1 answer
Migration to webpack 2 for ExtractTextPlugin
I am trying to migrate from webpack 1 to 2 based on this guide. I have made most of the changes but struggling with ExtractTextPlugin. This is how it currently looks with webpack 1:
module: {
loaders: [
{
test: /\.jsx?$/,
…

SharpCoder
- 18,279
- 43
- 153
- 249
0
votes
0 answers
webpack build error : Set is not defined
I am getting below Webpack error on a particular machine. on the other machine I am not getting any error & build is sucessful. on both machine we are using Webpack 2.2.1 version.
Error :
Set is not defined
at Compiler.…

Samir
- 691
- 5
- 22
0
votes
1 answer
Webpack & Css-loader. How to create dynamic className for React?
The project has the following reference, which returns a string:
const left = slide.imageLeft; // introLeft
And further renders it inside React Component. But it returns as a string styles.imageLeft and since webpack doest convert it into…

volna
- 2,452
- 4
- 25
- 61
0
votes
1 answer
Postcss - color function plugin - "Unable to parse color from string"
Using the following postcss plugins:
postcss-cssnext
postcss-nested
postcss-color-function
I constantly hit the following error, when using the following color function.
Unable to parse color from string "l(-20%)"
styles.css
@import…

Chris
- 54,599
- 30
- 149
- 186
0
votes
0 answers
overlapping css rule in react-app
I have started learning React with the "create react app with webpack" configuration. I import css like this in react component js
import '../dist/css/bootstrap.min.css';
import '../dist/css/main.css';
but when webpack compiles the css, my main.css…

cahyowhy
- 553
- 2
- 9
- 26
0
votes
2 answers
webpack 1.12.13 Cannot resolve 'file' or 'directory' ./img/readme2.png
I use webpack 1.12.13 and webpack produces errors:
ERROR in ./~/css-loader!./src/styles/oil.css
Module not found: Error: Cannot resolve 'file' or 'directory' ./img/close.png in C:\react_oil\src\styles
@ ./~/css-loader!./src/styles/oil.css…

alexandr2006
- 19
- 3
0
votes
1 answer
Webpack - how to do simple css minification and concatenation
Webpack is powerful, sure, but it's confusing and complicated for beginners (like I am). Doesn't help that recently they moved to 2.2 so a lot of documentation I see is for the older version which adds to this difficulty.
All I want to do is this:
I…

Gerry
- 866
- 2
- 12
- 31
0
votes
1 answer
Why css-loader/style-loader throws unexpected character # error?
I took the Webpack tutorial from Angular.io and started to upgrade to Webpack 2 following the official and a not official guide.
I met the error below:
ERROR in ./public/css/styles.css
Module parse failed:…

AndrasCsanyi
- 3,943
- 8
- 45
- 77
0
votes
0 answers
Angular 2 with SCSS and WebPack - Full reload when changing scss file
all ! I'm moving from gulp to Webpack and I've some basic doubts...
In gulp, when I change my scss file, it's recompile and show the changes on the browser very instantly.
Using webpack, if I change the scss file, this is not applying the changes…

Marco Jr
- 6,496
- 11
- 47
- 86
0
votes
1 answer
webpack file-loader options aren't recognized
Being new to webpack, the answer might be staring me down but I don't see it. No matter how I try to pass them along, the file-loader options aren't found.
I'm using file-loader and I'm trying to pass a publicPath (or simply anything, at first)…

TDeSmet
- 9
- 3
0
votes
1 answer
Webpack.config.js Loaders Array not being used.
Is anyone here seasoned with Webpack? I'm playing around with it and running into an issue pretty early on. In the attached GIST my webpack.config.js doesn't seem to want to use the loaders array for any included files. If I inline the loaders they…

Corey
- 351
- 1
- 2
- 14
0
votes
1 answer
With webpack bundling, how can you make a required css file only apply to the component it is required on?
I have webpack looking for required css like this:
{
test: /\.css$/,
loader: 'style-loader!css-loader'
},
The problem is the css required by one component seems to be affecting other components. My understanding was that the css file required…

JakeP
- 327
- 3
- 14
0
votes
1 answer
webpack doesnt compile sass to outer file
I tried to use webpack for sass (compilation to outer file. Not a direct includind sass to some js files).
It doesn't work somehow, so from the output I'll receive bundle.js and that's all, but I want to have outer style.css
I don't know what I'm…

Velidan
- 5,526
- 10
- 48
- 86