You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to use scss @import features in a component scss file the component doesn't get recompiled/rebuild when editing the imported file while the build is running with --watch. Only when saving/changing again the component scss file the changes are taken up. Also on first build the import works as intended. The same happens when using the @use rule.
In my case I had one scss file where I wanted to have some shared styles and variables which I wanted to use in multiple components. Now each time I change something in the shared styles scss file I would need to go to each component and update there the component styles file. Exposing them globally is not really an option for me as I wanted to still have those css rules scoped on the component.
How To Reproduce
In this Stackblitz the behavior can be reproduced. Just let first the initial build finish, then go to the shared file called _shared-styles.scss and change for example a color. In the terminal one can see that no rebuild gets triggered by that already. In the output file dist/my-library/esm2022/lib/my-library.component.mjs the changes are also missing. Then try to make a change in the scss file which is directly included by the component via styleUrls and save it, only now the components gets rebuild with the changes of the shared scss file. This can also be seen in the above mentioned output file.
Expected Behaviour
The components styles should update as well if imported files gets changed and not only on first build or when changing the scss file referenced by the component.
Version Information
ng-packagr: 16.1.0
@angular/*: 16.1.7
typescript: 5.1.6
rxjs: 7.8.1
node: 16.20.0 (locally I had v18 with the same behavior)
npm: 9.4.2
The text was updated successfully, but these errors were encountered:
I see something similar when using tailwind. Changes applied to the component ts and html does not trigger anything. But after saving the scss file, it all builds fine.
Type of Issue
Description
When trying to use scss
@import
features in a component scss file the component doesn't get recompiled/rebuild when editing the imported file while the build is running with--watch
. Only when saving/changing again the component scss file the changes are taken up. Also on first build the import works as intended. The same happens when using the@use
rule.In my case I had one scss file where I wanted to have some shared styles and variables which I wanted to use in multiple components. Now each time I change something in the shared styles scss file I would need to go to each component and update there the component styles file. Exposing them globally is not really an option for me as I wanted to still have those css rules scoped on the component.
How To Reproduce
In this Stackblitz the behavior can be reproduced. Just let first the initial build finish, then go to the shared file called
_shared-styles.scss
and change for example a color. In the terminal one can see that no rebuild gets triggered by that already. In the output filedist/my-library/esm2022/lib/my-library.component.mjs
the changes are also missing. Then try to make a change in the scss file which is directly included by the component viastyleUrls
and save it, only now the components gets rebuild with the changes of the shared scss file. This can also be seen in the above mentioned output file.Expected Behaviour
The components styles should update as well if imported files gets changed and not only on first build or when changing the scss file referenced by the component.
Version Information
The text was updated successfully, but these errors were encountered: