I created a new monorepo angular project with the latest nx-create-wrokspace CLI. In the monorepo root, I have created a styles folder with an index.scss file in it. In the apps/{project}/project.json file I have added my styles folder as one of includedPaths:
I tried to test the path in my app.component.scss with @import 'index'; with a simple $color variable set in my styles.index.scss. However, it seems the includePaths are not respected, and my $color variable did not work.
My app.component.scss:
@import 'index';
body span {
color: $color;
}
My app.component.html:
<span>hello world</span>
Note: I did the exactly same configurations 2 years ago when the monorepo was still created with a angular.json file. I am not too sure if there is anything extra needs to be set for the project.json
Expected Behavior
The stylePreprocessorOptions.includePaths should be respected.
Github Repo
No response
Steps to Reproduce
Create an Angular monorepo project
Create a styles folder at the root
Add styles into stylePreprocessorOptions.includePaths
Try import the files under styles folder
Nx Report
Node : 18.12.1
OS : darwin x64
npm : 8.19.2
nx : 15.3.0
@nrwl/angular : 15.3.0
@nrwl/cypress : 15.3.0
@nrwl/detox : Not Found
@nrwl/devkit : 15.3.0
@nrwl/esbuild : Not Found
@nrwl/eslint-plugin-nx : 15.3.0
@nrwl/expo : Not Found
@nrwl/express : Not Found
@nrwl/jest : 15.3.0
@nrwl/js : 15.3.0
@nrwl/linter : 15.3.0
@nrwl/nest : Not Found
@nrwl/next : Not Found
@nrwl/node : Not Found
@nrwl/nx-cloud : Not Found
@nrwl/nx-plugin : Not Found
@nrwl/react : Not Found
@nrwl/react-native : Not Found
@nrwl/rollup : Not Found
@nrwl/schematics : Not Found
@nrwl/storybook : Not Found
@nrwl/web : Not Found
@nrwl/webpack : 15.3.0
@nrwl/workspace : 15.3.0
typescript : 4.8.4
---------------------------------------
Local workspace plugins:
---------------------------------------
Community plugins:
@ngxs/schematics: 0.0.1-alpha.5
Current Behavior
I created a new monorepo angular project with the latest nx-create-wrokspace CLI. In the monorepo root, I have created a
styles
folder with anindex.scss
file in it. In theapps/{project}/project.json
file I have added mystyles
folder as one of includedPaths:I tried to test the path in my
app.component.scss
with@import 'index';
with a simple$color
variable set in mystyles.index.scss
. However, it seems the includePaths are not respected, and my$color
variable did not work.My
app.component.scss
:My
app.component.html
:Note: I did the exactly same configurations 2 years ago when the monorepo was still created with a
angular.json
file. I am not too sure if there is anything extra needs to be set for theproject.json
Expected Behavior
The
stylePreprocessorOptions.includePaths
should be respected.Github Repo
No response
Steps to Reproduce
styles
folder at the rootstyles
intostylePreprocessorOptions.includePaths
styles
folderNx Report
Failure Logs
No response
Additional Information
No response