estus estus - 1 year ago 274
Sass (Sass) Question

JetBrains WebStorm/PhpStorm include path for SASS/SCSS

In project SCSS files I'm using relative paths to libraries:

@import "../node_modules/packagename/styles";

I would like to use include paths for them:

@import "packagename/styles";

It is fine for the compiler (node-sass) that was supplied with full path to

However, IDE inspector throws

Cannot resolve directory 'packagename'

Can it be fixed without turning off the inspection?

Answer Source

Marking node_modules as Resource Root (Mark directory as/Resource root) should solve the issue

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download