-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
fix(tools): setup/update storybook only if there stories do exist #23413
fix(tools): setup/update storybook only if there stories do exist #23413
Conversation
@@ -668,6 +677,8 @@ function setupStorybook(tree: Tree, options: NormalizedSchema) { | |||
}); | |||
} | |||
|
|||
removeTsIgnorePragmas(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this should happen always no matter if init or remove of SB setup was initiated
|
||
const shouldInit = hasStories || hasTags; | ||
const shouldDelete = !shouldInit && hasStorybookConfig; | ||
const shouldInit = hasStories; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
simplified logic - this is now possible as no v9 component exists in react-examples. Also because create-component will create story files we can guarantee that this will be properly executed -> sb will be setup
📊 Bundle size report🤖 This report was generated against 635ec14c7f3abd77e9d02fa7970e501faeb2693e |
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 1119de0:
|
Asset size changesSize Auditor did not detect a change in bundle size for any component! Baseline commit: 635ec14c7f3abd77e9d02fa7970e501faeb2693e (build) |
Current Behavior
storybook setup is added to packages where its not needed
New Behavior
storybook is added only to packages that actually use/need storybook setup
Related Issue(s)
Fixes #20724