Questions tagged [webpack-style-loader]
461 questions
0
votes
0 answers
Angular 5 error when add global CSS file
When I add global CSS file to Angular project or even add some style to styles.css, I get Error from Webpack.
ERROR in…

Юлий Щербак
- 95
- 1
- 11
0
votes
0 answers
Loading and unloading css files in Vue 2
I have created my project with vue-cli and I have loaded css files using require in my main.js file.
I need to load different css files if user decides to see website in RTL languages (like displaying another theme).
I have searched and read about…

Nima Ajdari
- 2,754
- 2
- 14
- 18
0
votes
1 answer
Webpack 3 - Writing styles to a CSS file
I have read tons of tutorials and looked at more Github repos than I care to remember but I'm really struggling to setup Webpack 3 to do the following:
Compile SASS into CSS
Create a CSS file within a dist directory
Run Autoprefixer on CSS
Below…

James Howell
- 1,392
- 5
- 24
- 42
0
votes
1 answer
How to add CSS configuration in reactjs Project?
I've written the webpackconfig but css doesn't seem to work properly and it is throwing and error. Following are my file's contains.
My webpack.config.js:
module: {
loaders: [
{
test: /\.js?/,
include: SRC_DIR,
…

Riya Kapuria
- 9,170
- 7
- 18
- 32
0
votes
1 answer
Disable webpack from injecting CSS / Autoprefixer not working
New to webpack but currently webpack is injecting styles into my document body which I would like to disable. I am not sure how to accomplish this.
Here is my webpack.config.js
var webpack = require('webpack');
var autoprefixer =…

dnaluz
- 135
- 1
- 10
0
votes
1 answer
Cannot use css react js server side
I tried to add a lot of rules to my webpack config and nothing works..
My Github Sample. I wan't to use css files but I don't know what change to load css :
I tried something like:
{
test: /\.css$/,
loader: 'style!css'
}
or:
{
test:…

Psyycker
- 317
- 4
- 16
0
votes
1 answer
How to render nested classes with style-loader?
I'm trying to get nested classes render
.form {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
height: 100%;
.formGroup {
margin-bottom: 30px;
}
}
import { form } from…

Vlad Vinnikov
- 1,457
- 3
- 22
- 33
0
votes
1 answer
CSS- KeyFrame invalid property value
Not sure what I am facing here, but I am trying to apply CSS animation.
After doing some reseach, I thought adding webkit prefix will help the solution, but it looks like I am still facing issue where it is reading invalid property value.
Here's my…

Alejandro
- 2,266
- 6
- 35
- 63
0
votes
1 answer
Webpack - When are modules loaded?
I have a reservation.js script which contains a function to add a event listener to a form input.
paymentInstalments.addEventListener('click', ()=> (...))
This function is being executed on page load thorough jquery's $(document).ready()
However…

tmcrs123
- 55
- 1
- 8
0
votes
1 answer
how to read webpack's ExtractTextPlugin.extract use property?
In my webpack config file I have this line which I can't understand what it means and how to understand or debug it.
{
test: /\.(scss|css)$/,
use: isProd
? ExtractTextPlugin.extract({
use:…

Saras Arya
- 3,022
- 8
- 41
- 71
0
votes
1 answer
Using ExtractTextPlugin for Webpack, how do you not extract css and create an empty file with a flag?
Basically I want to extract css in production, but I want to leave it in the JavaScript file in development mode.
This is so I can have the sourcemap working which shows the sass files used.
I want to be able to have:

anonfg4rtz4aetae4tata4t
- 9
- 1
- 3
0
votes
1 answer
vuejs Importing css file only once
I have a large site with a lot of page, for 4-6 pages I need a specific css code. I don't want to add this css code to global file, instead I want is to whenever anyone of the page is browesed load that related specific file only once. I tried…

coure2011
- 40,286
- 83
- 216
- 349
0
votes
1 answer
Browser doesn't pickup local file change when running webpack watch
I try to run our ASP.NET MVC project with webpack2. As the first step, I set up webpack2 with ExtractTextPlugin.
When running webpack watch, I can see that the bundled css file gets updated.
But if I run the project with IISExpress and with webpack…

yyc
- 288
- 1
- 4
- 16
0
votes
3 answers
Is it possible to extract and bundle only necessary css classes in a web application
I think this should be possible, though dont know, I use tools like 'gulp' and 'webpack' to bundle asset files but is there any tool that extracts the necessary css classes, only that are being used, from the css files and pack them.

Ramesh Pareek
- 1,601
- 3
- 30
- 55
0
votes
1 answer
MIgrating WebPack 1 to 2, getting error
Below is my webpack js file (modified at many place to match v2), I am getting errors while trying to build the application.
var path = require('path');
const webpack = require('webpack');
const helpers = require('./helpers');
var…

Harry
- 17
- 4