Questions tagged [extract-text-plugin]
121 questions
0
votes
0 answers
Webpack extract text plugin - choosing position of stylesheet tag
I'm having some trouble placing stylesheet tags in the correct place with extract-text-webpack-plugin and Webpack 3.
My project uses third-party stylesheets pulled from a CDN, as well as a local stylesheet bundle. I would like the third-party…

bbalan
- 604
- 2
- 7
- 19
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
0 answers
extract text plugin - Module build failed: ModuleNotFoundError: Module not found:
I'm using the following module in my webpack config -
{
test: /\.css$/,
use: ExtractTextPlugin.extract({
fallback: "style-loader",
use: [
{
loader: "css-loader",
options: {
modules: true,
…

Finnnn
- 3,530
- 6
- 46
- 69
0
votes
1 answer
unminify pug using plugin ExtractTextPlugin
When I extract a .pug file with ExtractTextPlugin, it converts it to html but minify, as it unminify??
const extractHTML = new ExtractTextPlugin('[name]-pug.html');
....
{
test: /\.pug$/,
use: extractHTML.extract({
fallback:…

Diego Santa Cruz Mendezú
- 4,325
- 39
- 27
0
votes
2 answers
CSSO + ExtractTextPlugin in webpack not restructuring extracted page
I'm trying to create a scaffolding for my react project and learn webpack in the process. I've been trying to get my css modularized in their own component folders and get them extracted into a single styles.css file in the build folder.
The…

mrtiev
- 43
- 1
- 2
- 4
0
votes
1 answer
Webpack 3 sass loader error after building
I am using the latest version of webpack 3.4.1 using sass loader and extract text plugin to generate a static css file form the sass source. Its loading fine on my dev server and I can see the css file but getting a console error 'Uncaught…

Chris O
- 712
- 2
- 9
- 20
0
votes
1 answer
CSS is loaded but not applied via webpack
I'm currently setting up my webpack to extract all .css and .scss files into 1 large file which is done by using extract-text-webpack-plugin. I can see that the file is correctly compiled and is included into the html (created with…

NealVDV
- 2,302
- 3
- 26
- 51
0
votes
1 answer
webpack compiled successfully but extract text plugin no export content
Here is my webpack config:
const ExtractTextPlugin = require("extract-text-webpack-plugin");
module.exports = {
entry: {
index: [
"webpack-dev-server/client?http://localhost:8081",
"./components/index.js"
]
},
output: {
…

GLPease
- 545
- 1
- 8
- 19
0
votes
0 answers
What is the best approach of developing css in create-react-app?
I'm wondering how to conveniently develop css styles in unextracted create-react-app. I've just configured scss from using official readme instructions, but it seems that project has a mess of css and scss files. I want something like…

Dmytro Nalyvaiko
- 1,664
- 4
- 16
- 27
0
votes
2 answers
Extracting css from react component library
I have created react component library and I'm using style loader in component library
But at the place where I'm using that library, I need css in one file. Is there any way to do this with extract text plugin ?

Sagar
- 980
- 1
- 11
- 27
0
votes
0 answers
Can ExtractTextPlugin work with `ts-loader`?
I have been using ts-loader in Webpack. I would like to also use ExtractTextPlugin in combination with css-loader to bundle CSS. However, ExtractTextPlugin seems to be ignored, or overridden, when ts-loader is used alongside it. I have included an…

Chris Talman
- 1,059
- 2
- 14
- 24
0
votes
2 answers
Compiled Sass has weird changed class names Webpack 2 ExtractTextPlugin
So I have this code below in my webpack 2 config. It seems to work other than it is altering my css class names.
modules:
test: [/\.scss$/, /\.sass$/],
loader: ExtractTextPlugin.extract({
fallback: 'style-loader',
use: [
{
loader:…

allencoded
- 7,015
- 17
- 72
- 126
0
votes
1 answer
Using Extract Text Plugin with Webpack
I'm trying to learn how to use Extract Text Plugin and I found this example:
var ExtractTextPlugin = require('extract-text-webpack-plugin');
module.exports = {
entry: './src',
output: {
path: 'build',
filename: 'bundle.js',
},
…

Quoc-Hao Tran
- 1,312
- 3
- 13
- 20
0
votes
2 answers
webpack doesn't copy font files
I try to set up a webpack config for my vue2 application. It should also create the css from sass. So i get a look to laravel's mix plugin to create my own webpack config. It works fine, but when I include font awesome in my sass file (@import…

wendt88
- 544
- 5
- 22
0
votes
1 answer
Webpack - ExtractTextPlugin : No css file generated, no error
I am trying to use the https://github.com/webpack-contrib/extract-text-webpack-plugin in order to get a mixed css file.
With my current situation, I have this :
As you can see, I have my js file, my fonts but no sign of css file ...
I tried…

jy95
- 773
- 13
- 36