Skip to content

Commit 24a9fb3

Browse files
Initial webpack prod setup
1 parent 0d4c30f commit 24a9fb3

File tree

11 files changed

+907
-39
lines changed

11 files changed

+907
-39
lines changed

package-lock.json

Lines changed: 801 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,17 @@
55
"main": "src/main.js",
66
"scripts": {
77
"start": "webpack-dev-server --mode development --open --hot",
8-
"build": "webpack --mode production",
8+
"prebuild": "rimraf dist",
9+
"build": "cross-env NODE_ENV=production webpack -p --config webpack.config.production.js",
10+
"dev": "webpack -d --config webpack.config.development.js --watch --hot",
911
"electron": "electron .",
1012
"lint": "eslint ."
1113
},
1214
"author": "Blessing Ebowe, Brian Taylor, Erik Gunther",
1315
"license": "MIT",
1416
"dependencies": {
17+
"@material-ui/core": "^1.4.1",
18+
"autoprefixer": "^9.0.1",
1519
"electron": "^2.0.5",
1620
"react": "^16.2.0",
1721
"react-dom": "^16.2.0",
@@ -23,14 +27,20 @@
2327
"babel-loader": "^7.1.4",
2428
"babel-preset-env": "^1.6.1",
2529
"babel-preset-react": "^6.24.1",
30+
"babel-preset-stage-1": "^6.24.1",
31+
"cross-env": "^5.2.0",
2632
"css-loader": "^0.28.11",
2733
"eslint": "^4.19.0",
2834
"eslint-config-airbnb-base": "^13.0.0",
2935
"eslint-plugin-babel": "^5.1.0",
3036
"eslint-plugin-import": "^2.13.0",
3137
"eslint-plugin-jsx-a11y": "^6.1.1",
3238
"eslint-plugin-react": "^7.10.0",
39+
"extract-text-webpack-plugin": "^4.0.0-beta.0",
3340
"html-webpack-plugin": "^3.1.0",
41+
"postcss-loader": "^2.1.6",
42+
"rimraf": "^2.6.2",
43+
"sass-loader": "^7.0.3",
3444
"style-loader": "^0.20.3",
3545
"webpack": "^4.4.0",
3646
"webpack-cli": "^2.0.13",

postcss.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
const prefixer = require('autoprefixer');
2+
3+
module.exports = {
4+
plugins: [prefixer],
5+
};

src/config/index.js

Whitespace-only changes.

src/containers/.gitkeep

Whitespace-only changes.

src/public/images/.gitkeep

Whitespace-only changes.

src/index.html renamed to src/public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<meta charset="UTF-8">
66
<meta name="viewport" content="width=device-width, initial-scale=1.0">
77
<meta http-equiv="X-UA-Compatible" content="ie=edge">
8-
<title>My React App</title>
8+
<title>React Proto</title>
99
</head>
1010

1111
<body>

src/utils/.gitkeep

Whitespace-only changes.
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
const path = require('path');
2+
const webpack = require('webpack');
23
const HtmlWebpackPlugin = require('html-webpack-plugin');
4+
const ExtractTextPlugin = require('extract-text-webpack-plugin');
5+
6+
const DIST_DIR = path.join(__dirname, 'dist');
7+
const SRC_DIR = path.join(__dirname, 'src');
38

49
module.exports = {
5-
entry: './src/index.js',
10+
entry: './index.js',
611
output: {
712
path: path.join(__dirname, '/dist'),
813
filename: 'index_bundle.js',

0 commit comments

Comments
 (0)