CodeKit icon indicating copy to clipboard operation
CodeKit copied to clipboard

Minification of Angular applications

Open zeg-io opened this issue 9 years ago • 2 comments

Quick, short summary: Seemless Angular minification

Expected results: I'd like to just enable minification and have my angular JS just work. https://www.sitepoint.com/5-minutes-to-min-safe-angular-code-with-grunt/ explains why minification kills angular JS by default and what is needed to resolve it.

Not sure how I would achieve the result in the article short of turning off minification in the application and creating some hooks to minify.

Maybe this is a feature request?

Actual results: Broken code.

Exact steps to reproduce: Create an Angular 1.x application.
Minify the JS. See the Fail-whale

A link to download a simplified project or file that shows the issue:

Your configuration (any details about your system that you think might be relevant)

zeg-io avatar Nov 04 '16 16:11 zeg-io

It sounds like all you need to do is provide some Reserved Names to UglifyJS in Project Settings.

Sent from my iPhone

On Nov 4, 2016, at 09:05, Tony [email protected] wrote:

Quick, short summary: Seemless Angular minification

Expected results: I'd like to just enable minification and have my angular JS just work. https://www.sitepoint.com/5-minutes-to-min-safe-angular-code-with-grunt/ explains why minification kills angular JS by default and what is needed to resolve it.

Not sure how I would achieve the result in the article short of turning off minification in the application and creating some hooks to minify.

Maybe this is a feature request?

Actual results: Broken code.

Exact steps to reproduce: Create an Angular 1.x application. Minify the JS. See the Fail-whale

A link to download a simplified project or file that shows the issue:

Your configuration (any details about your system that you think might be relevant)

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

bdkjones avatar Nov 04 '16 16:11 bdkjones

You could also setup a Hook/Build process that runs https://www.npmjs.com/package/ng-annotate then push that output file through Uglify.

subhaze avatar Nov 04 '16 16:11 subhaze