Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 node_modules with includePaths option.

However, IDE inspector throws

Cannot resolve directory 'packagename'

Can it be fixed without turning off the inspection?

like image 704
Estus Flask Avatar asked Oct 07 '16 00:10

Estus Flask


1 Answers

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

like image 150
lena Avatar answered Sep 25 '22 21:09

lena