-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
feat(storybook): use native storybook/angular executor #9332
feat(storybook): use native storybook/angular executor #9332
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/nrwl/nx-dev/HykM5xDKbUoYfn26i7ZZqLZwAR7y [Deployment for daefc71 canceled] |
5a347aa
to
2fca68d
Compare
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.
Code looks good, let me check it out locally and do a test or two :)
2fca68d
to
ce68bc6
Compare
When building locally I had a TS error come from Error: packages/angular/src/migrations/update-12-3-0/update-storybook.ts:39:11 - error TS2367: This condition will always return 'true' since the types '"@storybook/react" | "@storybook/react-native" | "@storybook/html" | "@storybook/web-components" | "@storybook/vue" | "@storybook/vue3" | "@storybook/svelte"' and '"@storybook/angular"' have no overlap.
39 if (options.uiFramework !== '@storybook/angular') { Commenting that migration out, I can build. Which let me test it out. And it works well on a newly generated angular app! 🔥 And it also works for MFE apps where we end up changing the default builder etc. Awesome :) |
954c26c
to
d6c2ffc
Compare
d6c2ffc
to
e40938f
Compare
e40938f
to
c9be5a5
Compare
c9be5a5
to
f289897
Compare
f289897
to
02c6189
Compare
02c6189
to
00540de
Compare
4adcb71
to
ecee1da
Compare
ecee1da
to
89792f9
Compare
0fb8877
to
6ccdcee
Compare
6ccdcee
to
d4c53bb
Compare
This looks good on my side! There's a conflict the docs map, but otherwise this looks good! |
d4c53bb
to
9f26829
Compare
9f26829
to
d52f33e
Compare
d52f33e
to
4a1eda0
Compare
This pull request has already been merged/closed. If you experience issues related to these changes, please open a new issue referencing this pull request. |
Current Behavior
Right now, when we're invoking the Storybook target, the
@nrwl/storybook:storybook
runs, which is basically a wrapper aroundbuildDevStandalone
of Storybook. This may lead to inconsistencies between the native Storybook result and the Nx result. Plus, it brings the need for maintenance.Expected Behavior
If this works out, in the future, we're hoping to be using the native Storybook executors to serve and build Storybook, instead of the nx-wrapped ones, for Angular projects.
eg.
To try this out
Transform your existing Angular project
storybook
andbuild-storybook
targetsUse the generator
@nrwl/storybook:change-storybook-targets
to change your existing Angular project Storybook targets to use the native executor.Then run the storybook executor as you would normally (
nx storybook <PROJECT-NAME>
)Generate Storybook Configuration for a new Angular project
The new configuration will have the new targets
Sample Repo
Check out this repository - it shows all use cases.