diff --git a/.gitignore b/.gitignore
index 3815327..8b0ef75 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,3 +6,4 @@ dist
public
npm-debug.log
mywebsite
+stats.html
\ No newline at end of file
diff --git a/index.html b/index.html
index 6197da0..ee7c928 100644
--- a/index.html
+++ b/index.html
@@ -8,6 +8,9 @@
+
+
+
mitchel.io
diff --git a/package.json b/package.json
index 7434701..5245dc6 100644
--- a/package.json
+++ b/package.json
@@ -7,7 +7,7 @@
"analyze": "webpack --json | webpack-bundle-size-analyzer",
"build": "NODE_ENV=production webpack -p --progress --colors && babel-node metadata.js",
"c9": "webpack-dev-server --port $PORT --host $IP --hot --content-base dist --history-api-fallback",
- "check_gzip_size": "gzip -9 -c ./public/client.min.js | wc -c | numfmt --to=iec-i --suffix=B --padding=10",
+ "check-gzip-size": "gzip -9 -c ./public/client.min.js | wc -c | numfmt --to=iec-i --suffix=B --padding=10",
"deploy": "npm run get_dependencies && npm run prod && ./mywebsite",
"dev": "webpack-dev-server --content-base public --inline --hot --history-api-fallback",
"get_dependencies": "go get ./server && npm install",
@@ -64,6 +64,7 @@
"url-loader": "^0.5.7",
"webpack": "^1.13.1",
"webpack-dev-server": "^1.14.1",
+ "webpack-visualizer-plugin": "^0.1.5",
"whatwg-fetch": "^1.0.0"
}
}
diff --git a/webpack.config.js b/webpack.config.js
index c0ceb9c..cb0f093 100644
--- a/webpack.config.js
+++ b/webpack.config.js
@@ -3,6 +3,7 @@ var webpack = require('webpack');
var path = require('path');
var HtmlWebpackPlugin = require('html-webpack-plugin');
var autoprefixer = require('autoprefixer');
+var Visualizer = require('webpack-visualizer-plugin');
module.exports = {
devtool: debug ? "inline-sourcemap" : null,
@@ -36,7 +37,12 @@ module.exports = {
filename: "client.min.js"
},
plugins: getPlugins(),
- externals:{hljs: "hljs"}
+ externals:{
+ "hljs": "hljs",
+ "react": "React",
+ "react-dom": "ReactDOM",
+ "react-router": "ReactRouter"
+ }
};
function getPlugins(){
@@ -49,7 +55,10 @@ function getPlugins(){
}),
new webpack.EnvironmentPlugin([
"NODE_ENV"
- ])
+ ]),
+ new Visualizer({
+ filename: "../stats.html"
+ })
];
if(!debug){
plugins = plugins.concat([