Production Build Question about Comments and SourceMaps
Hi,
I've noticed when I am doing an npm run build:aot that the main.bundle has tons of code comments in it, is it possible to strip \ remove them to reduce the bundle size ? + are source maps needed for production builds ?
cheers, Christoph
Note: for support questions, please use one of these channels: Chat: AngularClass.slack or Twitter: @AngularClass
-
I'm submitting a ... [ ] bug report [ ] feature request [X ] question about the decisions made in the repository
-
Do you want to request a feature or report a bug?
-
What is the current behavior?
-
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://plnkr.co or similar (you can use this template as a starting point: http://plnkr.co/edit/tpl:AvJOMERrnz94ekVua0u5).
-
What is the expected behavior?
-
What is the motivation / use case for changing the behavior?
-
Please tell us about your environment:
- Angular version: 2.0.0-beta.X
- Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]
- Other information (e.g. detailed explanation, stacktraces, related issues, suggestions how to fix, links for us to have context, eg. stackoverflow, gitter, etc)
Hi. I am also interested in this. Since in production the source maps should not be delivered, right? You can add the option: sourceMap: false to the plugin UglifyJsPlugin in the production configuration.
new UglifyJsPlugin({ sourceMap: false, parallel: true, uglifyOptions: getUglifyOptions(supportES2015) }),