Skip to content

Commit

Permalink
fix: production build not working
Browse files Browse the repository at this point in the history
* build(webpack): update config

* docs(readme): update README

Closes (#11)
  • Loading branch information
Burak Tasci committed Sep 9, 2017
1 parent 873de21 commit 4cecdfd
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 45 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
- Production and development modes.
- [Webpack DLL]s to speed up development builds.
- [AoT compilation] for rapid page loads on production builds (*using [@ngtools/webpack]*).
- Tree-shaking the production builds with [fulls1z3/webpack].
- Tree-shaking the production builds with `harmony` branch of [UglifyJs2].
- Hot Module Replacement with [Webpack] and [webpack-hot-middleware].
- Both inline and external SCSS compilation.
- Lazy loading of modules.
Expand Down Expand Up @@ -71,7 +71,7 @@ Copyright (c) 2017 [Burak Tasci]
[Webpack DLL]: https://robertknight.github.io/posts/webpack-dll-plugins
[AoT compilation]: https://angular.io/docs/ts/latest/cookbook/aot-compiler.html
[@ngtools/webpack]: https://www.npmjs.com/package/@ngtools/webpack
[fulls1z3/webpack]: https://github.com/fulls1z3/webpack
[UglifyJs2]: https://github.com/mishoo/UglifyJS2/tree/harmony
[webpack-hot-middleware]: https://github.com/glenjamin/webpack-hot-middleware
[@ngx-config]: https://github.com/ngx-config/core
[@ngx-cache]: https://github.com/ngx-cache/core
Expand Down
84 changes: 42 additions & 42 deletions config/webpack.common.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,28 +127,28 @@ const browserConfig = {
*
* See: https://webpack.github.io/docs/list-of-plugins.html#uglifyjsplugin
*/
// new uglifyJsPlugin({
// // beautify: false,
// // mangle: {
// // screw_ie8: true
// // },
// output: {
// comments: false
// },
// compress: {
// screw_ie8: true,
// warnings: false,
// conditionals: true,
// unused: true,
// comparisons: true,
// sequences: true,
// dead_code: true,
// evaluate: true,
// if_return: true,
// join_vars: true,
// negate_iife: false // we need this for lazy v8
// }
// }),
new uglifyJsPlugin({
// beautify: false,
// mangle: {
// screw_ie8: true
// },
output: {
comments: false
},
compress: {
screw_ie8: true,
warnings: false,
conditionals: true,
unused: true,
comparisons: true,
sequences: true,
dead_code: true,
evaluate: true,
if_return: true,
join_vars: true,
negate_iife: false // we need this for lazy v8
}
}),

/**
* Plugin: CompressionPlugin
Expand Down Expand Up @@ -227,26 +227,26 @@ const serverConfig = {
*
* See: https://webpack.github.io/docs/list-of-plugins.html#uglifyjsplugin
*/
// new uglifyJsPlugin({
// // beautify: false,
// mangle: false, // to ensure process.env still works
// output: {
// comments: false
// },
// compress: {
// screw_ie8: true,
// warnings: false,
// conditionals: true,
// unused: true,
// comparisons: true,
// sequences: true,
// dead_code: true,
// evaluate: true,
// if_return: true,
// join_vars: true,
// negate_iife: false // we need this for lazy v8
// }
// })//,
new uglifyJsPlugin({
// beautify: false,
mangle: false, // to ensure process.env still works
output: {
comments: false
},
compress: {
screw_ie8: true,
warnings: false,
conditionals: true,
unused: true,
comparisons: true,
sequences: true,
dead_code: true,
evaluate: true,
if_return: true,
join_vars: true,
negate_iife: false // we need this for lazy v8
}
})//,

/**
* Plugin: CompressionPlugin
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@
"gulp-exec": "^2.1.3",
"gulp-tslint": "^8.0.0",
"gulp-replace": "^0.5.4",
"webpack": "fulls1z3/webpack#v2.5.1-harmony",
"webpack": "^2.5.1",
"uglify-js": "git://github.com/mishoo/UglifyJS2#harmony-v2.8.22",
"webpack-merge": "^4.1.0",
"webpack-hot-middleware": "^2.18.0",
"@ngtools/webpack": "^1.3.1",
Expand Down

0 comments on commit 4cecdfd

Please sign in to comment.