aseolin
aseolin

Reputation: 1200

Import SCSS folder from global SCSS

I'm using Angular (Jhipster) on my application and I want to import several .scss files on my glocal.scss file. So I created an "util" folder (same level as global.scss file) and added these .scss partials inside it. On top of my global.scss file, I treid to do:

@import "util";

@import "util/*";

@import "util/;

And other alternatives, but I'm receiving this error:

Module build failed (from ./node_modules/sass-loader/lib/loader.js):

undefined ^ Can't find stylesheet to import.

When I import one file at a time, it works.

How can I import a folder with .scss files inside my global .scss file?

Upvotes: 1

Views: 2993

Answers (1)

MkMan
MkMan

Reputation: 2191

I doesn't look like you can import a directory/folder based on this.

What you can do is in your utils folder create an index sass file that imports all the partials then importing utils should work based on this.

Upvotes: 4

Related Questions