IntelliJ marks @import in scss files as "unknown file or directory". Webstorm resolves them fine.

Answered

We are working on an angular project scaffolded with yeoman. The backend is REST with spring java.

Our custom scss files reside in /app/shared/styles.

The foundation framework is located in /bower-components/foundation/scss/

Grunt compass has the following attribute: importPath: './bower_components/foundation/scss',

So, when we use @import 'foundation/components/buttons in our scss, grunt compass compiles well.

However, IntelliJ marks a lot of errors. None of the imports are found. When we use Webstorm on the same project all errors disappear when marking "/bower_components/foundation/scss" as resources root. 

This approach does not work in IntelliJ. 

Our question: How can we configure IntelliJ to find the @import to the foundation framework in /bower_components. 

IntelliJ can handle javascript modules combined with java modules in one project. A great feature.  The problem as described above is forcing us to use Webstorm for frontend development.

 

 

2 comments
Comment actions Permalink

https://youtrack.jetbrains.com/issue/WEB-19458 is fixed in next Idea version, so it will be possible to use resource roots for SCSS paths resolving, like it can be done in WebStorm

0

Please sign in to leave a comment.