Skip to content
This repository has been archived by the owner on Oct 26, 2018. It is now read-only.

Commit

Permalink
Upgrade webpack to 2 and other deps too
Browse files Browse the repository at this point in the history
  • Loading branch information
timdorr committed Feb 10, 2017
1 parent 857cf4d commit 970b0d1
Show file tree
Hide file tree
Showing 4 changed files with 1,608 additions and 1,911 deletions.
10 changes: 1 addition & 9 deletions .eslintrc
@@ -1,11 +1,3 @@
{
"extends": "rackt",
"rules": {
"react/jsx-uses-react": 1,
"react/jsx-no-undef": 2,
"react/wrap-multilines": 2
},
"plugins": [
"react"
]
"extends": "react-app"
}
36 changes: 18 additions & 18 deletions package.json
Expand Up @@ -43,7 +43,7 @@
"devDependencies": {
"babel-cli": "^6.1.2",
"babel-core": "^6.7.4",
"babel-eslint": "^4.1.6",
"babel-eslint": "^7.1.1",
"babel-loader": "^6.2.0",
"babel-plugin-transform-es3-member-expression-literals": "^6.5.0",
"babel-plugin-transform-es3-property-literals": "^6.5.0",
Expand All @@ -52,32 +52,32 @@
"babel-preset-react": "^6.5.0",
"babel-preset-stage-1": "^6.3.13",
"babel-register": "^6.4.3",
"eslint": "^1.10.3",
"eslint-config-rackt": "^1.1.1",
"eslint-plugin-react": "^3.15.0",
"eslint": "^3.15.0",
"eslint-config-react-app": "^0.5.0",
"eslint-plugin-flowtype": "^2.29.2",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-jsx-a11y": "^4.0.0",
"eslint-plugin-react": "^6.8.0",
"expect": "^1.13.0",
"history": "^3.0.0",
"isparta": "^4.0.0",
"isparta-loader": "^2.0.0",
"karma": "^0.13.3",
"karma-chrome-launcher": "^0.2.0",
"karma-coverage": "^0.5.3",
"karma-firefox-launcher": "^0.1.7",
"karma-ie-launcher": "^0.2.0",
"karma-mocha": "^0.2.0",
"karma-mocha-reporter": "^1.0.4",
"karma-safari-launcher": "^0.1.1",
"karma": "^1.4.1",
"karma-coverage": "^1.1.1",
"karma-firefox-launcher": "^1.0.0",
"karma-mocha": "^1.3.0",
"karma-mocha-reporter": "^2.2.2",
"karma-sourcemap-loader": "^0.3.5",
"karma-webpack": "^1.7.0",
"mocha": "^2.3.4",
"react": "^0.14.3",
"react-dom": "^0.14.3",
"react-redux": "^4.4.0",
"karma-webpack": "^2.0.2",
"mocha": "^3.2.0",
"react": "^15.4.2",
"react-dom": "^15.4.2",
"react-redux": "^5.0.2",
"react-router": "^3.0.0",
"redux": "^3.0.4",
"redux-devtools": "^3.0.0",
"redux-devtools-dock-monitor": "^1.0.1",
"redux-devtools-log-monitor": "^1.0.1",
"webpack": "^1.12.9"
"webpack": "^2.2.1"
}
}
20 changes: 7 additions & 13 deletions webpack.config.js
Expand Up @@ -3,27 +3,21 @@ var webpack = require('webpack')
var config = {
entry: './src/index',
module: {
loaders: [
{ test: /\.js$/, loaders: [ 'babel' ], exclude: /node_modules/ }
rules: [
{ test: /\.js$/, use: [ 'babel-loader' ], exclude: /node_modules/ }
]
},
output: {
library: 'ReactRouterRedux',
libraryTarget: 'umd'
},
plugins: [
new webpack.optimize.OccurenceOrderPlugin()
]
}
}

if (process.env.NODE_ENV === 'production') {
config.plugins.push(
new webpack.optimize.UglifyJsPlugin({
compressor: {
warnings: false
}
})
)
config.plugins = [
new webpack.optimize.UglifyJsPlugin({ sourceMap: true }),
new webpack.LoaderOptionsPlugin({ minimize: true })
]
}

module.exports = config

0 comments on commit 970b0d1

Please sign in to comment.