Skip to content

Commit 9d71d91

Browse files
Merge pull request #8 from marcoaraujojunior/develop
Add uglify plugin
2 parents c5dca69 + ae50ead commit 9d71d91

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

public/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
</head>
88
<body>
99
<div id="app"></div>
10-
<script src="dist/bundle.js"></script>
10+
<script src="dist/bundle.min.js"></script>
1111
</body>
1212
</html>

webpack.config.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
const path = require('path');
22

3+
var webpack = require('webpack');
4+
35
module.exports = {
46
entry: "./app/App.js",
57
output: {
68
path: 'public/dist/',
79
publicPath: '/dist/',
8-
filename: "bundle.js",
10+
filename: "bundle.min.js",
911
},
1012
module: {
1113
loaders: [
@@ -25,6 +27,11 @@ module.exports = {
2527
}
2628
]
2729
},
30+
plugins: [
31+
new webpack.optimize.UglifyJsPlugin({
32+
compress: { warnings: false }
33+
})
34+
],
2835
resolve: {
2936
extensions: ['', '.js', '.jsx'],
3037
root: [

0 commit comments

Comments
 (0)