File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1717 "babel-preset-es2015-native-modules" : " ^6.6.0" ,
1818 "babel-preset-react" : " ^6.5.0" ,
1919 "css-loader" : " ^0.23.1" ,
20- "extract-text-webpack-plugin" : " ^1 .0.1 " ,
20+ "extract-text-webpack-plugin" : " ^2 .0.0-beta.3 " ,
2121 "file-loader" : " ^0.8.5" ,
2222 "node-sass" : " ^3.5.0-beta.1" ,
2323 "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');
44
55const nodeEnv = process . env . NODE_ENV || 'development' ;
66const isProd = nodeEnv === 'production' ;
7+ let extractCSS = new ExtractTextPlugin ( 'style.css' ) ;
78
89module . exports = {
910 devtool : isProd ? 'hidden-source-map' : 'cheap-eval-source-map' ,
@@ -18,7 +19,8 @@ module.exports = {
1819 } ,
1920 output : {
2021 path : path . join ( __dirname , './static' ) ,
21- filename : 'bundle.js'
22+ filename : 'bundle.js' ,
23+ publicPath : '/' ,
2224 } ,
2325 module : {
2426 loaders : [
@@ -31,7 +33,7 @@ module.exports = {
3133 } ,
3234 {
3335 test : / \. s c s s $ / ,
34- loaders : ExtractTextPlugin . extract ( 'style-loader' , 'css-loader! sass-loader' )
36+ loaders : extractCSS . extract ( [ 'css' , ' sass' ] )
3537 } ,
3638 {
3739 test : / \. ( j s | j s x ) $ / ,
@@ -80,9 +82,7 @@ module.exports = {
8082 new webpack . DefinePlugin ( {
8183 'process.env' : { NODE_ENV : JSON . stringify ( nodeEnv ) }
8284 } ) ,
83- new ExtractTextPlugin ( 'style.css' , {
84- allChunks : true
85- } )
85+ extractCSS ,
8686 ] ,
8787 devServer : {
8888 contentBase : './client' ,
You can’t perform that action at this time.
0 commit comments