Skip to content

Commit

Permalink
update webpack to 2.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolas committed Feb 16, 2017
1 parent 9dd5911 commit 090f252
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 21 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
"es6-promise": "^4.0.3",
"exports-loader": "^0.6.3",
"express": "^4.14.0",
"extract-text-webpack-plugin": "^1.0.1",
"extract-text-webpack-plugin": "^2.0.0-rc.3",
"json-loader": "^0.5.4",
"karma": "^1.3.0",
"karma-chai": "^0.1.0",
Expand All @@ -86,7 +86,7 @@
"snazzy": "^5.0.0",
"standard": "^8.3.0",
"style-loader": "^0.13.1",
"webpack": "^1.13.2",
"webpack": "^2.2.1",
"webpack-dev-middleware": "^1.8.3",
"webpack-hot-middleware": "^2.12.2",
"whatwg-fetch": "^2.0.1"
Expand Down
7 changes: 3 additions & 4 deletions webpack.config.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ module.exports = {
library: 'ReactPlayer'
},
plugins: [
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.DefinePlugin({
'process.env': {
'NODE_ENV': JSON.stringify('production')
}
}),
new webpack.ProvidePlugin({
'Promise': 'exports?global.Promise!es6-promise',
'window.fetch': 'exports?self.fetch!whatwg-fetch'
'Promise': 'exports-loader?global.Promise!es6-promise',
'window.fetch': 'exports-loader?self.fetch!whatwg-fetch'
}),
new webpack.optimize.UglifyJsPlugin({
compressor: {
Expand All @@ -30,7 +29,7 @@ module.exports = {
module: {
loaders: [{
test: /\.js$/,
loader: 'babel',
loader: 'babel-loader',
include: path.join(__dirname, 'src')
}]
},
Expand Down
15 changes: 7 additions & 8 deletions webpack.config.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,28 @@ module.exports = {
plugins: [
new webpack.HotModuleReplacementPlugin(),
new webpack.ProvidePlugin({
'Promise': 'exports?global.Promise!es6-promise',
'window.fetch': 'exports?self.fetch!whatwg-fetch'
}),
new webpack.NoErrorsPlugin()
'Promise': 'exports-loader?global.Promise!es6-promise',
'window.fetch': 'exports-loader?self.fetch!whatwg-fetch'
})
],
module: {
loaders: [{
test: /\.js$/,
loader: 'babel',
loader: 'babel-loader',
include: [
path.join(__dirname, 'src'),
path.join(__dirname, 'test', 'karma')
]
}, {
test: /\.json$/,
loader: 'json'
loader: 'json-loader'
}, {
test: /\.scss$/,
loader: 'style!css?sourceMap!sass?sourceMap',
loader: 'style-loader!css-loader?sourceMap!sass-loader?sourceMap',
include: path.join(__dirname, 'src')
}, {
test: /normalize.css$/,
loader: 'style?insertAt=top!css',
loader: 'style-loader?insertAt=top!css-loader',
include: path.join(__dirname, 'node_modules', 'normalize.css')
}]
}
Expand Down
13 changes: 6 additions & 7 deletions webpack.config.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,14 @@ module.exports = {
publicPath: '/'
},
plugins: [
new webpack.optimize.OccurenceOrderPlugin(),
new webpack.DefinePlugin({
'process.env': {
'NODE_ENV': JSON.stringify('production')
}
}),
new webpack.ProvidePlugin({
'Promise': 'exports?global.Promise!es6-promise',
'window.fetch': 'exports?self.fetch!whatwg-fetch'
'Promise': 'exports-loader?global.Promise!es6-promise',
'window.fetch': 'exports-loader?self.fetch!whatwg-fetch'
}),
new webpack.optimize.UglifyJsPlugin({
compressor: {
Expand All @@ -32,18 +31,18 @@ module.exports = {
module: {
loaders: [{
test: /\.js$/,
loader: 'babel',
loader: 'babel-loader',
include: path.join(__dirname, 'src')
}, {
test: /\.json$/,
loader: 'json'
loader: 'json-loader'
}, {
test: /\.scss$/,
loader: ExtractTextPlugin.extract('style', 'css?sourceMap!sass?sourceMap'),
loader: ExtractTextPlugin.extract({fallback: 'style-loader', use: 'css-loader?sourceMap!sass-loader?sourceMap'}),
include: path.join(__dirname, 'src')
}, {
test: /normalize.css$/,
loader: ExtractTextPlugin.extract('style', 'css'),
loader: ExtractTextPlugin.extract({fallback: 'style-loader', use: 'css-loader'}),
include: path.join(__dirname, 'node_modules', 'normalize.css')
}]
}
Expand Down

0 comments on commit 090f252

Please sign in to comment.