angular / angular-cli

CLI tool for Angular
https://cli.angular.io
MIT License
26.76k stars 11.98k forks source link

Can't uglify inline CSS in HTML when `ng build --prod` #10137

Closed Anduin2017 closed 5 years ago

Anduin2017 commented 6 years ago

Versions

Angular CLI: 1.7.3
Node: 9.9.0
OS: win32 x64
Angular: 5.2.9
... animations, common, compiler, compiler-cli, core, forms
... http, language-service, platform-browser
... platform-browser-dynamic, router, service-worker

@angular/cli: 1.7.3
@angular-devkit/build-optimizer: 0.3.2
@angular-devkit/core: 0.3.2
@angular-devkit/schematics: 0.3.2
@ngtools/json-schema: 1.2.0
@ngtools/webpack: 1.10.2
@schematics/angular: 0.3.2
@schematics/package-update: 0.3.2
typescript: 2.6.2
webpack: 3.11.0

Repro steps

Observed behavior

The output of built index.html is uglified(Compressed). The output of built index.html is using the CSS where was input and not uglified(Compressed).

Desired behavior

The output of built index.html should use uglified(Compressed) CSS.

alan-agius4 commented 5 years ago

Hi, this is expected since styles inside the HTML is outside of the build pipeline.

That said you might be interested in this feature request https://github.com/angular/angular-cli/issues/11395

angular-automatic-lock-bot[bot] commented 5 years ago

This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.