Skip to content

Commit

Permalink
Upgrade webpack and resolve dev security vulnerabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
krissalvador27 committed Dec 5, 2018
1 parent 6dc44cb commit f8fb621
Show file tree
Hide file tree
Showing 9 changed files with 1,866 additions and 198,260 deletions.
195,855 changes: 0 additions & 195,855 deletions docs/build/bundle.1e23df8e3bd09c5259cd.js

This file was deleted.

1 change: 0 additions & 1 deletion docs/build/bundle.1e23df8e3bd09c5259cd.js.map

This file was deleted.

71 changes: 71 additions & 0 deletions docs/build/bundle.1f47e4844e3e55b8a07f.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/build/bundle.1f47e4844e3e55b8a07f.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/build/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@
</div>

<div class="container-fluid" id="container">Loading...</div>
<script type="text/javascript" src="bundle.1e23df8e3bd09c5259cd.js"></script></body>
<script type="text/javascript" src="bundle.1f47e4844e3e55b8a07f.js"></script></body>
</html>
4,151 changes: 1,773 additions & 2,378 deletions package-lock.json

Large diffs are not rendered by default.

16 changes: 9 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
"src/"
],
"engines": {
"node": ">=4.0.0"
"node": ">=6.0.0"
},
"scripts": {
"lint": "eslint ./src",
"lint-fix": "eslint ./src ./tests ./docs/src --ext .js --fix",
"prepublish": "npm run build",
"prepublishOnly": "npm run build",
"build": "npm run build-lib && npm run build-css && npm run docs",
"dev": "webpack-dev-server --config webpack.config.base.js",
"docs": "npm run make-docs && npm run build-docs",
Expand Down Expand Up @@ -64,15 +64,15 @@
"chai": "^4.1.1",
"chai-enzyme": "^0.8.0",
"clean-webpack-plugin": "^0.1.16",
"component-playground": "^1.3.2",
"component-playground": "^3.2.1",
"copy-webpack-plugin": "^4.0.1",
"css-loader": "^0.28.4",
"enzyme": "^2.9.1",
"eslint": "^4.19.1",
"eslint-config-prettier": "2.9.0",
"eslint-plugin-prettier": "2.6.0",
"glob": "^7.1.2",
"html-webpack-plugin": "^2.30.1",
"html-webpack-plugin": "^3.2.0",
"jsdom": "^9.12.0",
"json-loader": "^0.5.2",
"less": "^3.0.4",
Expand All @@ -87,15 +87,17 @@
"react-pure-render-debug": "^1.1.1",
"react-router": "^4.1.2",
"react-router-dom": "^4.1.2",
"react-test-renderer": "^15.6.2",
"remark": "^8.0.0",
"remark-react": "4.0.1",
"remark-react": "^5.0.0",
"rewire": "^3.0.2",
"shelljs": "^0.7.8",
"sinon": "^4.1.2",
"sinon-chai": "^2.14.0",
"style-loader": "^0.18.2",
"webpack": "^3.4.1",
"webpack-dev-server": "^2.7.1"
"webpack": "^4.27.0",
"webpack-cli": "^3.1.2",
"webpack-dev-server": "^3.1.10"
},
"license": "Apache-2.0",
"repository": {
Expand Down
13 changes: 5 additions & 8 deletions webpack.config.base.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
var path = require('path');
var webpack = require('webpack');
var HtmlPlugin = require('html-webpack-plugin');
var CopyPlugin = require('copy-webpack-plugin');
const path = require('path');
const webpack = require('webpack');
const HtmlPlugin = require('html-webpack-plugin');
const CopyPlugin = require('copy-webpack-plugin');

module.exports = {
mode: "development",
context: __dirname,
entry: [
'./docs/src/main.js'
Expand Down Expand Up @@ -44,10 +45,6 @@ module.exports = {
{loader: 'css-loader'},
{loader: 'less-loader'}
]
},
{
test: /\.json$/,
use: [{loader: 'json-loader'}]
}
]
}
Expand Down
16 changes: 6 additions & 10 deletions webpack.config.build.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
var path = require("path");
var webpack = require("webpack");
var _ = require("lodash");
var config = require("./webpack.config.base");
var CleanPlugin = require("clean-webpack-plugin");
const path = require("path");
const _ = require("lodash");
const CleanPlugin = require("clean-webpack-plugin");

let config = require("./webpack.config.base");

config = _.merge(config, {
mode: "production",
plugins: config.plugins.concat([
new webpack.DefinePlugin({
"process.env": {
NODE_ENV: JSON.stringify("production")
}
}),
new CleanPlugin([path.join(__dirname, "docs/build")])
])
});
Expand Down

0 comments on commit f8fb621

Please sign in to comment.