3

I'm using NX.dev with Angular projects and I have a few projects and libs. Im having a few static CSS/SCSS files I want to share for all projects (Apps & libs)

First CSS file - I want to just bundle it in the projects, in order to do that I added it to the project JSON file per app like this.

"targets": {
"build": {
    "styles": [
        "libs/ui/src/lib/styles/style.bundle.css"
    ],
}

}

It's working great, But I'm not getting I'm getting the same effect for the libs (It's not working)...

Second SCSS file - this file is a global variable file, I want this file to be available on-demand in the lib SCSS files. I want each file to be able to do this:

@import "variables";

Not sure how to achieve that.

Any idea how can I get these two files into my libs? One file should add on compile and one on-demand.

Thanks in advance!

Matan Shushan
  • 1,204
  • 1
  • 10
  • 25
  • As you're asking two different things (1. how to include static resources in an angular lib in an nx monorepo? 2. how to share variables.scss between libs in an nx monorepo?) then it's probably best to post two different questions. – daiscog Jul 06 '22 at 10:42

0 Answers0