Skip to content
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

Configuring Sass file in angular-cli-build.js did not compile #678

Closed

Comments

@colinshen
Copy link

colinshen commented May 8, 2016

angular-cli: 1.0.0-beta.1
node: 4.4.3

I dont know I configued the sass file from npm was correct.

vendorNpmFiles: [
      'systemjs/dist/system-polyfills.js',
      'systemjs/dist/system.src.js',
      'zone.js/dist/*.js',
      'es6-shim/es6-shim.js',
      'reflect-metadata/*.js',
      'rxjs/**/*.js',
      '@angular/**/*.js',
      '@salesforce-ux/design-system/scss/index.scss'
    ]

after compileing. in dist file it is still sass file, not css

@Codenator81
Copy link

Codenator81 commented May 8, 2016

npm install node-sass --save-dev

should help and you don`t need add that to angular-cli-build.js
Angular Cli will compile SCSS automatically

@colinshen
Copy link
Author

colinshen commented May 8, 2016

@Codenator81 I installed node-sass. without angular-cli-build.js. how can I use it?

styleUrls: [
    '@salesforce-ux/design-system/scss/index.scss'
  ],

like this?

@Codenator81
Copy link

Codenator81 commented May 8, 2016

@colinshen No you need add for example

styleUrls: ['ngapp.component.css'],

but not scss like

styleUrls: ['ngapp.component.scss'],

just try do

ng build

and find where it is compiled to css

@colinshen
Copy link
Author

@Codenator81 thanks for your help. I got it.

@Bolza
Copy link

Bolza commented Aug 2, 2016

Then please guys could you fix the documentation https://github.com/angular/angular-cli#css-preprocessor-integration ? It stills says you should include scss files.

@YiniYin
Copy link

YiniYin commented Aug 6, 2016

The doco is wrong! It does NOT make sense to set styleUrls: [my.scss] at all!

@filipesilva
Copy link
Contributor

@Bolza @YiniYin the docs are current for the webpack version, which is still in testing and not tagged as latest. I've added a note here: #1694

@daveo1001
Copy link

daveo1001 commented Feb 8, 2017

I'm an idiot. my css I was using to test didn't affect anything in the component.

@angular-automatic-lock-bot
Copy link

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.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 6, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.