New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Angular 13. Global styles no longer work in SB 6.4 (CSS or SCSS) #16802
Comments
|
Also to add. The default global styles generated by angular get ignored as well.
Let me know if I can be of any help! In previous versions I believe styles that were mentioned in the styles & stylePreprocessorOptions sections of angular.json were included into the storybook build automatically ... |
While we are waiting for a resolution may be @ThibaudAV could point us in a direction to a potential workaround for this issue? Noticed you are fairly active in this area so thought I'd ping you. Cheers |
Found a work-around.
h/t @ThibaudAV for pointers in his repos Should probably be fixed in the upcoming releases of SB |
yes exactly. but you don't have to add There are still 2 points to do to improve storybook on this subject.
but the idea was to have this workaround quickly to avoid loss of functionality. |
@shilman Could you label this issue as "has workaround"? it will help others to stop digging :-) |
hi, is there a workaround for "global styles" coming from an npm package ? They are ignored as well |
You have to add them in angular.json. Refer to angular docs not an SB "issue"
|
It cannot be used for a angular library, right ? |
Any news when this will be fixed ? I tried the workaround and it doesn't seem to work. |
preview.scss:
preview.js:
Does not work. I have workspace.json in my nx project (not angular.json and it's not the same because nx is running the storybook not angular/storybook):
|
I tracked the issue a bit and it seems for my project I can update to
|
@nicolae536 UPDATE: released as |
Thank you.
Issues still to be resolved:
|
@shilman |
Thanks for your patience everybody! Closing this. |
It is not resolved though! External static styles are not loaded as mentioned in my last comment so the original issue is still happening |
Probably a bit of cross contamination here, but does anyone have a workaround for using this in an nx monorepo? EDIT: This looks like a suitable solution nrwl/nx#8681 |
Describe the bug
To Reproduce
Attaching a minimal reproduction generated myself as npx sb@next repro fails.
styles_issue_repro.zip
Just run the below to see the reproduction of the issue
Expected result
Global styles should apply, i.e.
System
macOS Monterey
OS Version 12.0.1
npm 6.14.15
node v14.18.1
Additional context
n/a
The text was updated successfully, but these errors were encountered: