Skip to content

Commit c122c9f

Browse files
committed
upgrade react-hot-boilerplate to webpack 4
1 parent 34a528b commit c122c9f

File tree

3 files changed

+2915
-534
lines changed

3 files changed

+2915
-534
lines changed

examples/react-hot-boilerplate/package.json

+6-6
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
"version": "1.0.0",
44
"description": "Boilerplate for ReactJS project with hot code reloading",
55
"scripts": {
6-
"start": "webpack-dev-server",
6+
"start": "webpack-dev-server --mode development",
77
"prebuild": "rimraf dist",
8-
"build": "cross-env NODE_ENV=production webpack -p --config webpack.config.production.js",
8+
"build": "cross-env webpack --mode production --config webpack.config.production.js",
99
"postbuild": "copyfiles index.html dist"
1010
},
1111
"repository": {
@@ -35,15 +35,15 @@
3535
"@types/react-hot-loader": "^3.0.4",
3636
"copyfiles": "^1.2.0",
3737
"cross-env": "^3.1.4",
38-
"fork-ts-checker-webpack-plugin": "^0.2.8",
38+
"fork-ts-checker-webpack-plugin": "^0.4.0",
3939
"react-hot-loader": "^3.0.0",
4040
"rimraf": "^2.6.0",
41-
"ts-loader": "^3.0.0",
41+
"ts-loader": "^4.0.0",
4242
"tslint": "^5.8.0",
4343
"tslint-react": "^3.2.0",
4444
"typescript": "^2.5.3",
45-
"webpack": "^3.0.0",
46-
"webpack-dev-server": "^2.2.0"
45+
"webpack": "^4.0.0",
46+
"webpack-dev-server": "^3.0.0"
4747
},
4848
"dependencies": {
4949
"react": "^16.0.0",

examples/react-hot-boilerplate/webpack.config.production.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ var webpack = require('webpack');
33
const ForkTsCheckerWebpackPlugin = require('fork-ts-checker-webpack-plugin');
44

55
module.exports = {
6-
entry: './src/index.js',
6+
entry: './src/index.tsx',
77

88
output: {
99
filename: 'static/bundle.js',
@@ -26,10 +26,6 @@ module.exports = {
2626
},
2727

2828
plugins: [
29-
new webpack.optimize.UglifyJsPlugin({
30-
sourceMap: true,
31-
comments: false
32-
}),
3329
new ForkTsCheckerWebpackPlugin({
3430
tslint: true,
3531
checkSyntacticErrors: true

0 commit comments

Comments
 (0)