Skip to content

Commit

Permalink
Package upgrades and webpack config changes
Browse files Browse the repository at this point in the history
  • Loading branch information
shupp committed Dec 2, 2016
1 parent 63eb1b5 commit cbb4ffc
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 16 deletions.
31 changes: 19 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,27 @@
"url": "https://github.com/shupp/VegaDNS-UI.git"
},
"dependencies": {
"babel-runtime": "^5.8.20",
"flux": "^2.0.3",
"babel-runtime": "^6.11.6",
"flux": "^2.1.1",
"keymirror": "^0.1.1",
"react": "^0.14.2",
"react-addons-css-transition-group": "^0.14.2",
"react-dom": "^0.14.2",
"react-select": "^0.9.1",
"urijs": "^1.16.1"
"react": "^15.3.0",
"react-addons-css-transition-group": "^15.3.0",
"react-bootstrap": "^0.30.2",
"react-dom": "^15.3.0",
"react-file-download": "^0.3.1",
"react-loader": "^2.4.0",
"react-select": "^1.0.0-beta14",
"urijs": "^1.18.1"
},
"devDependencies": {
"babel-core": "^5.8.21",
"babel-loader": "^5.3.2",
"html-webpack-plugin": "^1.6.1",
"webpack": "^1.11.0",
"webpack-dev-server": "^1.10.1"
"babel-core": "^6.13.2",
"babel-loader": "^6.2.5",
"babel-preset-es2015": "^6.13.2",
"babel-preset-react": "^6.11.1",
"style-loader": "^0.13.1",
"css-loader": "^0.24.0",
"html-webpack-plugin": "^2.22.0",
"webpack": "^1.13.1",
"webpack-dev-server": "^1.14.1"
}
}
34 changes: 30 additions & 4 deletions webpack.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,18 @@
var webpack = require('webpack');
var plugins = [];
var devtool = "inline-source-map";

if (process.env.hasOwnProperty('ENV') && process.env.ENV === 'production') {
devtool = "source-map";

plugins.push(
new webpack.DefinePlugin({
'process.env': {
'NODE_ENV': JSON.stringify('production')
}
})
);
}

// webpack.config.js
module.exports = {
Expand All @@ -15,10 +29,22 @@ module.exports = {
{
test: /\.js$/,
loader: 'babel',
exclude: /(node_modules)/
}
exclude: /node_modules/,
query: {
cacheDirectory: true,
presets: ['es2015', 'react']
}
},
{
test: /\.css$/,
loader: 'style-loader!css-loader'
},
]
},
devtool: "inline-source-map",
debug: true
plugins: plugins,
devtool: devtool,
debug: true,
node: {
fs: "empty"
}
};

0 comments on commit cbb4ffc

Please sign in to comment.