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 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' ,
@@ -18,7 +19,8 @@ module.exports = {
18
19
} ,
19
20
output : {
20
21
path : path . join ( __dirname , './static' ) ,
21
- filename : 'bundle.js'
22
+ filename : 'bundle.js' ,
23
+ publicPath : '/' ,
22
24
} ,
23
25
module : {
24
26
loaders : [
@@ -31,7 +33,7 @@ module.exports = {
31
33
} ,
32
34
{
33
35
test : / \. s c s s $ / ,
34
- loaders : ExtractTextPlugin . extract ( 'style-loader' , 'css-loader! sass-loader' )
36
+ loaders : extractCSS . extract ( [ 'css' , ' sass' ] )
35
37
} ,
36
38
{
37
39
test : / \. ( j s | j s x ) $ / ,
@@ -80,9 +82,7 @@ module.exports = {
80
82
new webpack . DefinePlugin ( {
81
83
'process.env' : { NODE_ENV : JSON . stringify ( nodeEnv ) }
82
84
} ) ,
83
- new ExtractTextPlugin ( 'style.css' , {
84
- allChunks : true
85
- } )
85
+ extractCSS ,
86
86
] ,
87
87
devServer : {
88
88
contentBase : './client' ,
You can’t perform that action at this time.
0 commit comments