Search code examples
angularwebstormangular-dartscss-mixins

Unable to import Angular Components styling in SCSS file


I've been following the getting-started guide for making an AngularDart Web App. I've got a small app up and running via WebStorm. I added an SCSS Watcher to the project which compiles fine, but throws the following type of error whenever I try to import one of the Angular Component styles:

@import 'package:angular_components/app_layout/mixins';

error style.scss (Line 1: File to import not found or unreadable: package:angular_components/app_layout/mixins.)

I am clueless on how to proceed. Would greatly appreciate advice.


Solution

  • The SASS watcher doesn't know about Dart import syntax.

    Add instead https://pub.dartlang.org/packages/sass_builder instead to pubspec.yaml and SASS will be built as part of Darts build process.