Angular-cli: Generate style into css instead of js

Created on 6 Apr 2017  路  3Comments  路  Source: angular/angular-cli

Bug Report or Feature Request (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ x ] feature request

Versions.

@angular/cli: 1.0.0
node: 6.9.1
os: win32 ia32
@angular/common: 4.0.1
@angular/compiler: 4.0.1
@angular/core: 4.0.1
@angular/forms: 4.0.1
@angular/http: 4.0.1
@angular/platform-browser: 4.0.1
@angular/platform-browser-dynamic: 4.0.1
@angular/router: 4.0.1
@angular/cli: 1.0.0
@angular/compiler-cli: 4.0.1

Desired functionality.

New angular cli generates the compiled scss into JavaScript, that appends those styles into the html head tag between style tags.
Is it possible to rather generate .css files and import them in link tags?

Mention any other details that might be useful.

In the JS, these styles aren't minified, they contain even the \n linebreaks in the style string.

@filipesilva: do you have any clue?

Most helpful comment

Production builds by default extract global stylesheets into a CSS bundle. This can also be controlled independently via the --extract-css build command option.

All 3 comments

Production builds by default extract global stylesheets into a CSS bundle. This can also be controlled independently via the --extract-css build command option.

@clydin: that worked perfectly! Thank you!

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._

Was this page helpful?
0 / 5 - 0 ratings