Skip to content

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

Closed

Description

@colinshen
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

Activity

  1. Codenator81 commented on May 8, 2016

    @Codenator81
    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

  2. colinshen commented on May 8, 2016

    @colinshen
    Author

    @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?

  3. Codenator81 commented on May 8, 2016

    @Codenator81

    @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

  4. colinshen commented on May 8, 2016

    @colinshen
    Author

    @Codenator81 thanks for your help. I got it.

  5. Bolza commented on Aug 2, 2016

    @Bolza

    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.

  6. YiniYin commented on Aug 6, 2016

    @YiniYin

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

  7. filipesilva commented on Aug 15, 2016

    @filipesilva
    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

  8. daveo1001 commented on Feb 8, 2017

    @daveo1001

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

  9. angular-automatic-lock-bot commented on Sep 6, 2019

    @angular-automatic-lock-bot

    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.

  10. locked and limited conversation to collaborators on Sep 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions