Angular-cli: CSS bundle either in JS format or CSS format depending on build.

Created on 21 Feb 2017  路  4Comments  路  Source: angular/angular-cli

Please provide us with the following information:

OS?

Windows 7, 8 or 10. Linux (which distribution). Mac OSX (Yosemite? El Capitan?)
Windows 8

Versions.

Please run ng --version. If there's nothing outputted, please run in a Terminal: node --version and paste the result here:
@angular/cli: 1.0.0-beta.32.3 [1.0.0-beta.22-1]
node: 6.9.4
os: win32 x64
@angular/common: 2.3.1
@angular/compiler: 2.3.1
@angular/core: 2.3.1
@angular/forms: 2.3.1
@angular/http: 2.3.1
@angular/platform-browser: 2.3.1
@angular/platform-browser-dynamic: 2.3.1
@angular/router: 3.3.1
@angular/cli: 1.0.0-beta.32.3
@angular/compiler-cli: 2.3.1

Repro steps.

Was this an app that wasn't created using the CLI? What change did you do on your code? etc.

Not sure if this is intended, but running ng build outputs a style.bundle.js file, while ng build --prod produces a style.bundle.css file. This is not an issue when serving up the default index.html file that is generated. But in my case, i'm serving up a server rendered start page, and are adding script/css references using a gulp workflow. I have modified this gulp build process to account for the css file when using the --prod switch. I'm just wondering if this is a bug or intended.

The log given by the failure.

Normally this include a stack trace and some more information.

Mention any other details that might be useful.


Thanks! We'll be in touch soon.

Most helpful comment

Hey, this is intended but configurable. The --extract-css output defaults to true on prod and false on dev.

It's actually kinda slow to output the CSS proper so we leave it off for rebuild speed.

All 4 comments

@mikelunn this is intended. During dev it is a js file which helps to sleep up rebuild and output to its proper css format for final builds. @filipesilva should be able to confirm though

Hey, this is intended but configurable. The --extract-css output defaults to true on prod and false on dev.

It's actually kinda slow to output the CSS proper so we leave it off for rebuild speed.

@deebloo @filipesilva Thanks!

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