Questions tagged [extract-text-plugin]
121 questions
1
vote
0 answers
Can I output only a css file using an entry point?
I'm trying to find a way to only output a .css file and not a .js file with it. I cannot seem to find an automated way to handle this.
Example (simplified)
entry: {
polyfill: [
'babel-polyfill',
'react-fastclick'
],
app:…

NealVDV
- 2,302
- 3
- 26
- 51
1
vote
2 answers
webpack extract css into separate file using extract-text-webpack-plugin
i am trying to extract all .css into a separate file using webpack. To do this i am using xtract-text-webpack-plugin.
for some reason i am not getting any file out put after running web pack.
here is my webpack.config file
var path =…

kkdeveloper7
- 497
- 2
- 11
- 25
1
vote
1 answer
Webpack extract text plugin unknow word export error
I'm having these errors when bundling my app and I can't figure why it's not working. I was using style-loader before and now I'm trying to implement extract-text plugin but got these errors :
The thing is all of this was actually working with…

Gatsbill
- 1,760
- 1
- 12
- 25
1
vote
0 answers
reactjs, getting sperated css output using webpack ExtractTextPlugin
Hope someone has an idea.
I want to have two files, one for mobile and one for desktop/tablet. I haven't yet found any solution with webpack.
At the moment I include my css over the js-code like this:
import * as React from "react";
import…

crazyx13th
- 533
- 5
- 10
1
vote
1 answer
Webpack Extract-Text-Plugin localIdentName not working in DOM
I saw the FlipKart , they made hash all of their classNames and its CSSes.
I know that they use SCSS for building CSS.
How can I config my WebPack to make my exportation like their:
This is my webpack:
var webpack = require('webpack'),
path =…

AmerllicA
- 29,059
- 15
- 130
- 154
1
vote
2 answers
Webpack - Build css not applied
I am new to ReactJS. I am trying to use scss in react using sass-loaders
My webpack config looks like this-
var webpack = require('webpack');
var path = require('path');
var APP_DIR = path.resolve(__dirname + 'react-js/src/');
var BUILD_DIR =…

Ankush
- 173
- 2
- 14
1
vote
0 answers
ExtractTextPlugin gives images wrong path
I'm having troubles with compiling sass with Webpack. ExtractTextPlugin gives images wrong path, prepending 'css/' to it. When I change the filename in ExtractTextPlugin options to '/app.css', it puts app.css to the dist/ folder instead of css, but…

Olga
- 119
- 1
- 1
- 12
1
vote
0 answers
Webpack ExtractTextPlugin multiple Less files to multiple CSS files
All examples I find, sends to one file, but I would like to:
/style/foo.less to /style/foo.css
It should put the css in same folder as the less it finds.

Eduardo in Norway
- 736
- 6
- 13
1
vote
1 answer
Webpack building both css and js files
my problem is that webpack builds both js and css files when the input is sass file. Here is what
webpack outputs. I just want css files to be outputed for scss, not both. I do not know how to do that. I hope someone can help.
Here is my code.
let…

Filip Vojtíšek
- 81
- 7
1
vote
1 answer
Get one css file from webpack multiple entry points
I use webpack for my project. I have 2 entry points: the first one's for CSS files with CSS modules, the second - for global css files. Main.css isn't imported from any file in project so I made a special entry point for it.
const extractStylesCss =…

Alexandra Vorobyova
- 107
- 1
- 7
1
vote
1 answer
Is there a practical way of adding Webpack's generated stylesheets in Production
I'm building a normal App (JQuery, ES6, etc) with webpack and it's usual loaders. I came across the following situation:
In development, I wish to use the style-loader, to have my css in an inline tag.
In production, I want to have a…

Marcelo Henrique
- 98
- 5
1
vote
1 answer
How to use 'extract-text-plugin' in my webpack setup
I've been attempting to understand "production mode" in webpack. From what I gether now in webpack 2 you can run webpack -p but that doesn't seem as feature rich.
My setup I carried over from Webpack 1 is like so:
var config = {
context: __dirname +…

Auzy
- 2,135
- 2
- 25
- 35
1
vote
1 answer
imported styles not loaded with ExtractTextPlugin
my styles are not loading when I use the following syntax
import '../styles/some-component.scss';
but they will load when I use modules like so (which makes sense that they should since I have the css-loader modules option set to true):
import…

Jordan
- 5,085
- 7
- 34
- 50
1
vote
0 answers
Cannot extract css file from Vue by Webpack
I am using Webpack 1.12.0 to build a Vue component. My goal is to create a [name].min.js file and [name].min.css file for my package.
I try to use extract-text-webpack-plugin to extract css to a single file and follow this instruction for Webpack…

pexea12
- 1,069
- 2
- 18
- 36
1
vote
0 answers
webpack 2 + extract-text-webpack-plugin: parsing errors
I'm trying to make a webpack config for my project with some scss. Some of it comes from the root project and some scss I want to load from dependencies e.g. from node_modules. I'm running into a strange error where if I don't include the…

Dmitry Fadeev
- 2,073
- 2
- 12
- 12