Skip to content

Commit f03f82b

Browse files
authored
Merge pull request #37 from r-park/dev
chore: misc. updates
2 parents cd65fec + b864a0a commit f03f82b

File tree

4 files changed

+30
-28
lines changed

4 files changed

+30
-28
lines changed

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"node": ">=5.11"
1818
},
1919
"scripts": {
20-
"build": "cross-env NODE_ENV=production webpack --display-chunks --display-modules --progress",
20+
"build": "cross-env NODE_ENV=production webpack --display-chunks --progress",
2121
"clean": "del-cli ./target",
2222
"dev": "cross-env NODE_ENV=development webpack-dev-server --progress",
2323
"lint": "eslint -c .eslintrc.yml *.js ./src ./server",
@@ -48,25 +48,25 @@
4848
"extract-text-webpack-plugin": "~1.0.1",
4949
"firebase": "~3.1.0",
5050
"firebase-tools": "3.0.4",
51-
"html-webpack-plugin": "~2.21.0",
51+
"html-webpack-plugin": "~2.22.0",
5252
"jasmine-core": "~2.4.1",
5353
"karma": "~1.0.0",
5454
"karma-chrome-launcher": "~1.0.1",
5555
"karma-jasmine": "~1.0.2",
5656
"karma-sourcemap-loader": "~0.3.7",
5757
"karma-webpack": "~1.7.0",
58-
"minx": "~0.4.14",
58+
"minx": "r-park/minx.git",
5959
"morgan": "~1.7.0",
6060
"node-sass": "~3.8.0",
6161
"nodemon": "~1.9.2",
6262
"npm-run-all": "~2.3.0",
6363
"postcss-loader": "~0.9.1",
64-
"react": "~15.1.0",
65-
"react-addons-test-utils": "~15.1.0",
66-
"react-dom": "~15.1.0",
64+
"react": "~15.2.0",
65+
"react-addons-test-utils": "~15.2.0",
66+
"react-dom": "~15.2.0",
6767
"react-hot-loader": "3.0.0-beta.2",
6868
"react-redux": "~4.4.5",
69-
"react-router": "~2.5.1",
69+
"react-router": "~2.5.2",
7070
"react-router-redux": "~4.0.5",
7171
"redux": "~3.5.2",
7272
"redux-thunk": "~2.1.0",

src/main.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import 'babel-polyfill';
21
import './styles/styles.scss';
32

43
import React from 'react';

src/vendor.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Polyfills
2+
import 'babel-polyfill';
3+
4+
// React Redux
5+
import 'react';
6+
import 'react-dom';
7+
import 'react-hot-loader';
8+
import 'react-redux';
9+
import 'react-router';
10+
import 'react-router-redux';
11+
import 'redux';
12+
import 'redux-thunk';
13+
14+
//
15+
import 'classnames';
16+
import 'firebase';

webpack.config.js

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ module.exports = config;
3636

3737

3838
config.resolve = {
39-
extensions: ['', '.ts', '.js'],
39+
extensions: ['', '.js'],
4040
modulesDirectories: ['node_modules'],
4141
root: path.resolve('.')
4242
};
@@ -63,9 +63,7 @@ config.sassLoader = {
6363
//-------------------------------------
6464
if (ENV_DEVELOPMENT || ENV_PRODUCTION) {
6565
config.entry = {
66-
main: [
67-
'./src/main'
68-
]
66+
main: ['./src/main.js']
6967
};
7068

7169
config.output = {
@@ -76,6 +74,7 @@ if (ENV_DEVELOPMENT || ENV_PRODUCTION) {
7674

7775
config.plugins.push(
7876
new HtmlWebpackPlugin({
77+
chunkSortMode: 'dependency',
7978
filename: 'index.html',
8079
hash: false,
8180
inject: 'body',
@@ -94,7 +93,8 @@ if (ENV_DEVELOPMENT) {
9493
config.entry.main.unshift(
9594
`webpack-dev-server/client?http://${HOST}:${PORT}`,
9695
'webpack/hot/only-dev-server',
97-
'react-hot-loader/patch'
96+
'react-hot-loader/patch',
97+
'babel-polyfill'
9898
);
9999

100100
config.module = {
@@ -136,20 +136,7 @@ if (ENV_DEVELOPMENT) {
136136
if (ENV_PRODUCTION) {
137137
config.devtool = 'source-map';
138138

139-
config.entry.vendor = [
140-
'babel-polyfill',
141-
'classnames',
142-
'firebase',
143-
'history',
144-
'react',
145-
'react-dom',
146-
'react-hot-loader',
147-
'react-redux',
148-
'react-router',
149-
'react-router-redux',
150-
'redux',
151-
'redux-thunk'
152-
];
139+
config.entry.vendor = './src/vendor.js';
153140

154141
config.output.filename = '[name].[chunkhash].js';
155142

@@ -162,7 +149,7 @@ if (ENV_PRODUCTION) {
162149

163150
config.plugins.push(
164151
new WebpackMd5Hash(),
165-
new ExtractTextPlugin('styles.css'),
152+
new ExtractTextPlugin('styles.[contenthash].css'),
166153
new webpack.optimize.CommonsChunkPlugin({
167154
name: 'vendor',
168155
minChunks: Infinity

0 commit comments

Comments
 (0)