Reputation: 5245
I am trying to build a angular 11 library with some wrapper components around Syncfusion's EJ2.
I am trying to import scss files from their node_modules directive, and as per their documentation, to avoid SCSS compilation issues and to map the SCSS file path it's required to add "node_modules/@syncfusion"
to the "includePaths"
property of the "stylePreprocessorOptions"
in the angular.json config file.
Being in angular library however, I do not have such property. What would be the equivalent or a way to achieve the same result?
ALREADY TRIED
Upvotes: 0
Views: 1134
Reputation: 199
We have created a sample angular library application for your reference that you can download from the below link.
Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/workspace1508444094
“ng-package.json” configuration:
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/lib",
"lib": {
"entryFile": "src/public-api.ts",
"styleIncludePaths": [“../../node_modules/@syncfusion”]
}
}
“lib.component.scss”:
@import '~@syncfusion/ej2-angular-buttons/styles/material.scss';
Upvotes: 3