File tree 2 files changed +5
-6
lines changed 2 files changed +5
-6
lines changed Original file line number Diff line number Diff line change 17
17
"babel-preset-es2015-native-modules" : " ^6.6.0" ,
18
18
"babel-preset-react" : " ^6.5.0" ,
19
19
"css-loader" : " ^0.23.1" ,
20
- "extract-text-webpack-plugin" : " ^1 .0.1 " ,
20
+ "extract-text-webpack-plugin" : " ^2 .0.0-beta.3 " ,
21
21
"file-loader" : " ^0.8.5" ,
22
22
"node-sass" : " ^3.5.0-beta.1" ,
23
23
"sass-loader" : " ^3.1.2" ,
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ const ExtractTextPlugin = require('extract-text-webpack-plugin');
4
4
5
5
const nodeEnv = process . env . NODE_ENV || 'development' ;
6
6
const isProd = nodeEnv === 'production' ;
7
+ let extractCSS = new ExtractTextPlugin ( 'style.css' ) ;
7
8
8
9
module . exports = {
9
10
devtool : isProd ? 'hidden-source-map' : 'cheap-eval-source-map' ,
@@ -21,7 +22,7 @@ module.exports = {
21
22
output : {
22
23
path : path . join ( __dirname , './static' ) ,
23
24
filename : 'bundle.js' ,
24
- publicPath : '/'
25
+ publicPath : '/' ,
25
26
} ,
26
27
module : {
27
28
loaders : [
@@ -34,7 +35,7 @@ module.exports = {
34
35
} ,
35
36
{
36
37
test : / \. s c s s $ / ,
37
- loaders : ExtractTextPlugin . extract ( 'style-loader' , 'css-loader! sass-loader' )
38
+ loaders : extractCSS . extract ( [ 'css' , ' sass' ] )
38
39
} ,
39
40
{
40
41
test : / \. ( j s | j s x ) $ / ,
@@ -83,9 +84,7 @@ module.exports = {
83
84
new webpack . DefinePlugin ( {
84
85
'process.env' : { NODE_ENV : JSON . stringify ( nodeEnv ) }
85
86
} ) ,
86
- new ExtractTextPlugin ( 'style.css' , {
87
- allChunks : true
88
- } )
87
+ extractCSS ,
89
88
] ,
90
89
devServer : {
91
90
contentBase : './client' ,
You can’t perform that action at this time.
0 commit comments