diff --git a/config/webpack.config.js b/config/webpack.config.js
index <HASH>..<HASH> 100644
--- a/config/webpack.config.js
+++ b/config/webpack.config.js
@@ -1,4 +1,8 @@
 var path = require('path');
+var webpack = require('webpack');
+
+
+
 
 // for prod builds, we have already done AoT and AoT writes to disk
 // so read the JS file from disk
@@ -12,8 +16,20 @@ function getEntryPoint() {
   return '{{TMP}}/app/main.dev.js';
 }
 
+function getPlugins() {
+  if (process.env.IONIC_ENV === 'prod') {
+    return [
+      // This helps ensure the builds are consistent if source hasn't changed:
+      new webpack.optimize.OccurrenceOrderPlugin(),
+      // Try to dedupe duplicated modules, if any:
+      // Add this back in when Angular fixes the issue: https://github.com/angular/angular-cli/issues/1587
+      //new DedupePlugin()
+    ];
+  }
+  return [];
+}
+
 module.exports = {
-  devtool: 'source-map',
   entry: getEntryPoint(),
   output: {
     path: '{{BUILD}}',
@@ -31,5 +47,15 @@ module.exports = {
         loader: 'json'
       }
     ]
+  },
+
+  plugins: getPlugins(),
+
+  // Some libraries import Node modules but don't use them in the browser.
+  // Tell Webpack to provide empty mocks for them so importing them works.
+  node: {
+    fs: 'empty',
+    net: 'empty',
+    tls: 'empty'
   }
 };
\ No newline at end of file
chore(webpack): add optimize plugins