New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Non uglified CSS returned when using server side rendering #12541
Comments
@vikerman is the |
This is a big feature request. The uglification would have to plugged into the Angular compiler because the CSS is embedded in the JS generated from the Angular templates |
@filipesilva @vikerman thanks very much your answer? @vikerman okay I understand. Is it something planned for an Angular version? Is there some known workarounds? Thanks! |
Hi all, CSS minification in Universal is something which is already supported. You need to add
|
Let's add a separate flag for minifying CSS on the server builder. |
@alan-agius4 works for me! thanks! |
…rsal production config - When using Universal sourceMaps should not be enabled or at least `styles` sourceMaps should be disabled as these will otherwise be inlined and will be set as apart of the server side rendered page. - While there is no benefit to optimize the scripts at server level, styles should always be minified so that the server side rendered page is smaller. Fixes #12541 and Fixes #12940
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Bug Report or Feature Request (mark with an
x
)Command (mark with an
x
)Versions
Node:
v9.4.0
NPM:
5.6.0
Angular CLI
Repro steps
I have an universal application. I package it using the following commands:
I use the following configuration in
angular.json
:The application builds fine and everything is uglified.
The problem is when accessing the application using server rendering some additional non-uglified CSS is added in the html file. Here is a sample:
I can't find any way to remove the
<style ng-transition="serverApp">...</style>
block...The log given by the failure
Desired functionality
I would like to have uglified code when rendering with universal.
Mention any other details that might be useful
The text was updated successfully, but these errors were encountered: