eyeglass icon indicating copy to clipboard operation
eyeglass copied to clipboard

importing specific file from lib

Open ThePeach opened this issue 6 years ago • 0 comments

I'm currently having a big problem here. From what I'm gathering from the documentation, I should be able to import a specific file inside an eyeglass module:

If your build-tool is eyeglass-aware, you can reference the eyeglass module with standard Sass import syntax: @import "my_eyeglass_module/file";. The my_eyeglass_module will be resolved to the correct directory in your node modules, and the file will then resolve using the standard import rules for Sass.

Unfortunately this doesn't seem the case, or at least I have no idea how to configure the module in order to be able to do so.

If my module has the following directory structure:

/sass/
   _index.scss
   _color.scss

if I try to do @include "my_eyeglass_module"; works without problems, but @include "my_eyeglass_module/color"; fails miserably with an error repeated 4 times:

Message:
    src/sass/abstracts/_color.scss
Error: Error: Could not import my_eyeglass_module/color from any of the following locations:
   ...... (all relative directories inside the current project)
        on line 1 of src/sass/abstracts/_color.scss
        from line 11 of src/sass/main.scss
>> @import 'my_eyeglass_module/color';

Even trying to help it a little bit more seems useless, @include "my_eyeglass_module/sass/color"; yields the very same sequence of repeated errors.

What am I doing wrong here? Any help is greatly appreciated before I lose my sanity :)

ThePeach avatar Jul 17 '18 09:07 ThePeach