Skip to content

Commit fef130a

Browse files
committed
Merge branch 'mihirsoni-fixing-dependecies-error'
2 parents c4010ca + 2bc9bef commit fef130a

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
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",

webpack.config.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const ExtractTextPlugin = require('extract-text-webpack-plugin');
44

55
const nodeEnv = process.env.NODE_ENV || 'development';
66
const isProd = nodeEnv === 'production';
7+
let extractCSS = new ExtractTextPlugin('style.css');
78

89
module.exports = {
910
devtool: isProd ? 'hidden-source-map' : 'cheap-eval-source-map',
@@ -21,7 +22,7 @@ module.exports = {
2122
output: {
2223
path: path.join(__dirname, './static'),
2324
filename: 'bundle.js',
24-
publicPath: '/'
25+
publicPath: '/',
2526
},
2627
module: {
2728
loaders: [
@@ -34,7 +35,7 @@ module.exports = {
3435
},
3536
{
3637
test: /\.scss$/,
37-
loaders: ExtractTextPlugin.extract('style-loader', 'css-loader!sass-loader')
38+
loaders: extractCSS.extract(['css','sass'])
3839
},
3940
{
4041
test: /\.(js|jsx)$/,
@@ -83,9 +84,7 @@ module.exports = {
8384
new webpack.DefinePlugin({
8485
'process.env': { NODE_ENV: JSON.stringify(nodeEnv) }
8586
}),
86-
new ExtractTextPlugin('style.css', {
87-
allChunks: true
88-
})
87+
extractCSS,
8988
],
9089
devServer: {
9190
contentBase: './client',

0 commit comments

Comments
 (0)