I would like to import scss files from bootstrap in my NX workspace.
I would need to import the /node_modules/bootstrap/scss/functions
file in the libs/folderName/components/src/lib/my-component component
In the scss file I have this:
@import "/node_modules/bootstrap/scss/functions";
in the my-app/project.json file:
"stylePreprocessorOptions": {
"includePaths": [
"node_modules/bootstrap/scss"
]
}
but when I run the application, I get an error on build:
Error in ./libs/folderName/components/src/lib/my-component/my-component.component.scss?ngResource
The module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: cannot find a styleset to import.
╷
2 │ @import "functions
" │ ^^^^^^^^^^^
How to import bootstrap scss into a library in NX?