Hi :)
I'm currently trying to do the following:
So I import the base styles, then I override some scss variables, and then import the button styles. And in the runtime, this works fine. However, when I want to execute sass on this file (let's call it button.scss), it throws an error:
Error: Can't find stylesheet to import.
1 │ @use 'ej2-base/styles/material-definition.scss';
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
node_modules\@syncfusion\ej2-buttons\styles\button\material.scss 1:1 @import
node_modules\@syncfusion\ej2-buttons\styles\material.scss 1:9 @use
assets\styles\button.scss 2:1 root stylesheet
error Command failed with exit code 65.
The reason I try to execute sass is, that I want to provide my developers with a compiled CSS file for the button control, that is based on Material but incorporates our design choices.
Can you help me? If you need any more information, please let me know.
With kind regards,
Colin Finger
"stylePreprocessorOptions": {
"includePaths": [
]
},
|
@import "@syncfusion/ej2-base/styles/material.scss";
@import "@syncfusion/ej2-buttons/styles/material.scss"; |
Hello Gayathri,
your example works, but wenn I run the unit tests with "ng test" the following error appears:
Error: Module build failed (from ./node_modules/sass-loader/dist/cjs.js):
SassError: Can't find stylesheet to import.
@import 'ej2-icons/styles/material.scss';
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
node_modules\@syncfusion\ej2-base\styles\material.scss 1:9 @import
src\styles.scss 1:9 root stylesheet
Sincerly
René
Hi Team,
Thanks for your update,
Currently, we are validating your query and we will update further details within two business days on or before 5th May 2022.
We appreciate your patience until then.
Regards,
Gokul
Hi Team,
Thanks for your patience,
We have validated your query and please add the below configuration setup in your angular.json file to resolve your reported issue at our end.
angular.json
"stylePreprocessorOptions": { "includePaths": ["node_modules/@syncfusion"] }, |
For your convenience, we have created a sample with this configuration which is working fine and can be downloaded and used from the following sample link.
Regards,
Gokul
Hi Team,
Thanks for your patience,
We have validated your query and please add the below configuration setup in your angular.json file to resolve your reported issue at our end. It must be included in angular.json file in the “test” inside the options object.
angular.json
"stylePreprocessorOptions": { "includePaths": ["node_modules/@syncfusion"] }, |
For your convenience, we have created a sample with this configuration which is working fine and can be downloaded and used from the following sample link.
Regards,
Gokul
Thank you very mutch, that works on my side too.
Maybe it is a good idea to write that in the documentain too.
Regards
René
Hi Team,
Thanks for your update,
Already we have considered this as a documentation improvement at our end and we will correct this documentation with any of our upcoming releases.
Please get back to us if you have any queries.
Regards,
Gokul
Hi Team,
We are glad to announce that our Essential Studio 2022 Volume 2 release v20.2.0.36 is rolled out. We have improvised our all documentation and included in this release.
Please refer the below documentation.
https://ej2.syncfusion.com/angular/documentation/getting-started/angular-cli/#adding-scss-reference
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.
Regards,
Ragunath S