Questions tagged [extract-text-plugin]
121 questions
0
votes
1 answer
Module build failed: Error: "extract-text-webpack-plugin" when import .scss file
this issue occurred when I import .scss file in react component.
package.json
"scripts": {
"dev": "source ./.env && nodemon server.js"
},
"devDependencies": {
"babel-core": "^6.26.0",
"babel-loader": "^7.1.4",
"babel-preset-env": "^1.6.1",
…

Giambi Huang
- 111
- 1
- 13
0
votes
1 answer
CSS loader and Extract Text Plugin Use Case Webpack
I understand that CSS-loader just modularizes your CSS so that if you import style.css in your foo.js, whenever foo.js gets run, it has a reference to style.css such that your elements created in foo.js can then have the hashed classNames of…

mangocaptain1
- 515
- 1
- 6
- 12
0
votes
1 answer
Style loader does not working if bundle is presented
If I'm using dev mode, style loader works fine. But when I build project and I have dist folder, I can't see style tag in head tag. What's interesting, I can't see style tag only if bundle.js file is presented in dist.
My config:
const path =…

user8685433
- 370
- 2
- 9
0
votes
1 answer
webpack ExtractTextPlugin unexpected '@'
So I have an angular app which uses webpack. I haven't changed anything since December where it worked fine. But upon pulling the repo on a new machine and making sure I've run npm install followed by the webpack command I'm getting the following…

Simon Willan
- 378
- 3
- 14
0
votes
1 answer
postcss-loader doesn't work with ExtractTextPlugin in webpack 3?
Configuration
webpack.config.js
test: /\.css$/,
exclude: /node_modules/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: [
{
loader: 'css-loader',
options: { importLoaders: 1 }
},
…

Carlos Rincon
- 13
- 1
- 6
0
votes
2 answers
Parse Error in css-loader sass-loader
I am migrating from webpack 1 to 3. After going through so many errors and now I am stuck on this. Can someone please HELP!
I am getting these errors -
ERROR in ./src/main/main.scss
Module parse failed: Unexpected token (1:4)
You may need an…

Shivam Kumar
- 121
- 2
- 8
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
Render CSS Classes w/ No Styles Using Webpack Extract Plugin
We use the Extract Text plugin with Webpack 3 and it works great but we recently hired a QA automation engineer who works in Selenium.
We are discussing ways to make selecting elements with Selenium easier but on the front end side. That would…

Dan DiGangi
- 79
- 7
0
votes
1 answer
Can't set includePaths when using ExtractTextPlugin and sass-loader
I'm using the newest version of webpack and extract-text-webpack-plugin. I am trying to following the instructions to Export Sass or LESS. I've been reading questions and answers around this all day and still have not found anything that works. I…

flyingL123
- 7,686
- 11
- 66
- 135
0
votes
1 answer
ExtractTextPlugin: How do I avoid having CSS Keyframes renamed?
If two animations are defined in one file, this file is then included in another two files, animations get the same single letter name a which breaks one of them with lower priority (because the latter overrides the former)
Source: css-loader…

burtyish
- 1,033
- 2
- 13
- 27
0
votes
1 answer
Webpack Won't Bundle CSS with ExtractTextPlugin
I know someone is going to mark this as a duplicate, but nothing on the entire web seems to be what I need.
This is almost a direct copy/paste of the example found here. This is after meticulously following along with the tutorial found here.
When…

Cody
- 9,785
- 4
- 61
- 46
0
votes
1 answer
Webpack bootstrap ExtractTextPlugin SCSS - Module Parse Failed Unexpected character '@'
I'm attempting to output a css file from bootstrap 4.0.0 beta scss using webpack. I've successfully handled scss with an inline style injection as per: https://getbootstrap.com/docs/4.0/getting-started/webpack/ . There are issues related to having…

billy jean
- 1,399
- 4
- 25
- 45
0
votes
2 answers
Enable Hot Reloading With Webpack and PostCSS
I am looking to hot reload my window when I save a stylesheet in my text editor. Currently, I have to manually reload the page to see any changes. Below is the snippet in my Webpack configuration file that handles processing css:
module: {
rules:…

iknowhtml
- 17
- 7
0
votes
1 answer
ExtractTextPlugin doesn't work with Angular AOT build
So I am trying to create a Angular (4.4.4) Webpack (3.6.0) starter with AOT build and I am running into an issue with extracting the css into a seperate bundle (using extract-text-webpack-plugin 3.0.1).
When I run my prod build the webpack build…

Mr.wiseguy
- 4,092
- 10
- 35
- 67
0
votes
3 answers
Extract text Webpack plugin compile error
I'm using "webpack": "^3.1.0" and "extract-text-webpack-plugin": "^1.0.1"
Trying to compile sass and I get the following error: Error: "extract-text-webpack-plugin" loader is used without the corresponding plugin, refer to…

Filth
- 3,116
- 14
- 51
- 79