1

I am working on an angular-cli project. I am using SCSS and they're getting compiled and I can observe the changes of them. styles.css and app.component.scss in the root path are neither getting compiled nor can observe the changes.

enter image description here

Here it's the root folder structure. style.css is compiled to the root structure (This is done in angular-cli.json)

"styles": [
      "../node_modules/bootstrap/dist/css/bootstrap.min.css",
      "../node_modules/mdi/css/materialdesignicons.min.css",
      "../node_modules/roboto-fontface/css/roboto/roboto-fontface.css",
      "../node_modules/font-awesome/css/font-awesome.min.css",
      "../node_modules/tinymce/skins/lightgray/skin.min.css",
      "styles.css"
    ]

You cannot see the style.css because, it's hidden using vscode settings. What is wrong here and how can i get the changes applied here?

Saiyaff Farouk
  • 5,103
  • 4
  • 24
  • 38

2 Answers2

0

What version of angular cli are you using?

I was using 1.0.0-beta.22-1 and styles.css was not properly being bundled in the prod build. Downgraded to 1.0.0-beta.19-3 and it works again. Seems to be a bug in the later cli project.

jms
  • 3
  • 2
0

Managed to solve this. The problem I encountered was because of initially when my project was created the default extension for styles was CSS and it has been changed by the time since styling with SCSS is much prettier.

So, the issue was the previous configuration in angular-cli.json. when the compilation happens, it doesn't detect the change in the SCSS file, but its search for a CSS This was the answer helped me to understand the mistake - Angular2 - Angular-CLI SASS options

PS - It's where I went on the mistake.

Community
  • 1
  • 1
Saiyaff Farouk
  • 5,103
  • 4
  • 24
  • 38