Ionic-app-scripts: watch mode sass update with custom config not working

Created on 29 Sep 2016  路  10Comments  路  Source: ionic-team/ionic-app-scripts

package.json contains:

"scripts": {
...
    "sass": "ionic-app-scripts --sass ./config/sass.config.js",
...
  },
  "config": {
    "ionic_sass": "./config/sass.config.js"
  },

When I run ionic serve the initial ionic-app-scripts build works OK. When I modify an SCSS file and the watch is triggered, sassConfig no longer contains the custom file but rather the default config located in this repo.

This may apply to other overrides as well.

All 10 comments

Maybe related to #59

@anveo @peterpeterparker would you be able to update to the latest and try again: npm install @ionic/app-scripts@latest Thanks

Can confirm that I've got the same issue when using a custom sass.config on 0.0.28

@anveo Do you have customized your includePaths property in your custom sass.config? Because I have set to an empty array to remove default stylings, the entries get inserted again though through the scripts when watch is triggered.

This happens in: sass.ts => sassUpdate => fillConfigDefaults

@adamdbradley unfortunately didn't solved my issue, thx for trying to find a fix.

on scss change while running "ionic serve" still see:

ionic $ [18:43:22]  sass started ...
[18:43:23]  Sass Error: line: 85, column: 1
File to import not found or unreadable: _bourbon.scss
Parent style sheet:    /Users/me/Documents/projects/project/src/app/app.component.scss
[18:43:23]  sass failed:  Sass compile error

@peterpeterparker I've fixed it. Committing in a few minutes and issue a pull request

Pull request #90 is ready. Tested it, works for sass.

On a side note, this was a problem in these tasks:

  • copy
  • ngc
  • sass

@cmaart sweet christmas :)

Tested it too, works fine, no more error msg about the third libraries on reload. Thx a lot.

Hello all! Going to go ahead and close this issue as it looks like @cmaart 's PR fixed this issue. Thanks a ton @cmaart !

No worries. It's save to close i think, been working with the fix for a while now!

Was this page helpful?
0 / 5 - 0 ratings