Questions tagged [extract-text-plugin]
121 questions
2
votes
2 answers
Link css filename with hash to index.html after the Extract Text Plugin
I would like to ask how can I link the generated css files with a hash name to my index.html after I run the npm for my production:
"build-production": "webpack -p --progress --colors --config webpack.config.production.js"
This is the plugin in my…

Sydney Loteria
- 10,171
- 19
- 59
- 73
2
votes
1 answer
Webpack 2 ExtractTextPlugin CSS sourcemaps overwriting babel 6 JS sourcemaps
EDIT: found a solution shortly after posting this question. See My Answer below.
I have a webpack 2 based project that uses ExtractTextPlugin to pull out SCSS/CSS into a separate file.
Additionally, I have two entry points defined in webpack…

tdc
- 5,174
- 12
- 53
- 102
2
votes
3 answers
Angular 2 throws 'cssText.replace is not a function' when using ExtractTextPlugin
I have two projects: Project A and Project B.
Project A
Webpack@2.2.1
Extract-text-webpack-plugin@2.0.0-rc.3
Angular 2.4.3
Project B
Angular 2.4.3
Project B provides a series of modules/components to Project A.
The code is compiled (not…

Alvaro Contreras
- 313
- 3
- 13
1
vote
0 answers
Error: "extract-text-webpack-plugin" loader is used without the corresponding plugin
Here, I am getting the following error:
when I am trying to run karma tests
ERROR in ./node_modules/@cwds/components/dist/Layouts/Layout.module.scss
Module build failed: Error: "extract-text-webpack-plugin" loader is used without the corresponding…

sunil b
- 685
- 2
- 8
- 21
1
vote
0 answers
extract-text-webpack-plugin doesn't load css in dynamically loaded chunks
I'm working on a multi-entry web app & building with webpack 3, with using extract-text-webpack-plugin to separate entries' css in separate files.
Currently, I'm trying to load some modules dynamically along with their own css to enhance…

AbdelHady
- 9,334
- 8
- 56
- 83
1
vote
0 answers
Next.js: Webpack ExtractTextPlugin not extracting scss in nodes_modules with next-sass
I have starting a new project with Next, and my main problem is the following:
My app composes external components that are transpiled and installed via npm. this components require sass files
I use the simple withSass module provided by the Zeit…

Antoine Laurent
- 21
- 4
1
vote
0 answers
Styles file is empty after Webpack migration from v3 to 4 (ExtractTextPlugin not working)
I use Webpack for an Angular application. After migration to 4 version of the bundler file style.css (created by ExtractTextPlugin) is empty (i.e. has no any content excepting the only string /*# sourceMappingURL=styles.css.map*/)
//…

Ilya Loskutov
- 1,967
- 2
- 20
- 34
1
vote
1 answer
Webpack 4 Having Trouble with Less
I'm new to using webpack and I'm simply trying to get it to handle both the typescript and less files in a new empty .net core web project, and output the corresponding js and css files to a specified folder.
I have managed to get the typescript to…

Will P.
- 8,437
- 3
- 36
- 45
1
vote
0 answers
ExtractTextPlugin Sass Loader Error
I am "webpack": "^1.14.0", "css-loader": "^0.26.1" "sass-loader": "^4.1.1" .
I see the console error
addStyles.js:147 Uncaught Error: Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.
at…

Ambarish Kumar
- 11
- 1
- 3
1
vote
0 answers
Wrong URL in CSS
I'm using the latest of everything.
I'm transpiling SASS to CSS and am referencing an image:
body{
background: url("../images/ugly-car.jpg");
}
The image gets changes according to my settings, but the path is incorrect after Webpack does its…

jBoive
- 1,219
- 1
- 14
- 40
1
vote
0 answers
webpack3 + css loader - setting absolute path aliases for relative font and image imports in css files
I want to alias the the relative font and image imports in my css and scss modules with absolute paths. The goal is store all of my font and image files in two central folders, without going through every css file and changing the relative imports,…

Arlo Feirman
- 95
- 10
1
vote
1 answer
Why does ExtractTextPlugin.extract produce an "__webpack_require__(...) is not a function" error
I have what should be a fairly standard Webpack rule to suppose SASS files:
{
test: /\.scss$/,
use: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: [
{
…

Wichert Akkerman
- 4,918
- 2
- 23
- 30
1
vote
2 answers
Webpack ExtractTextPlugin - avoid duplicate classes in output css
I'm building a react app and im using webpack 3 with css/sass loaders + the ExtractTextPlugin to compile my styles and generate main.css. All my scss variables, mixins and partials are compiling into one single main.css file, but my problem is that…

Majsan
- 13
- 1
- 3
1
vote
0 answers
Webpack multiple CSS outputs with ExtractText
I have a repo with multiple react components that need to work totally separated from each other, so every component has it's own output dir with the respective CSS, JS and HTML. To achieve this I iterate over an array with all the component names,…

baahrens
- 21
- 1
1
vote
0 answers
Create webpack plugin or loader to inject CSS file
I am writing a library with which you can render a React application as a web component. Like so:
ReactWebComponent.create( , 'my-react-web-component', { css: 'inject' });
You can see there is an option { css: 'inject' }. To create a web…

Lukas
- 9,752
- 15
- 76
- 120