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(storybook): add staticDirs object schema #8885
fix(storybook): add staticDirs object schema #8885
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/nrwl/nx-dev/BtuHZKe3uGpZ1eNgQoEthqUtnQsj |
Would be nice if this went in as they have added features that would be nice to use in the storybook executor |
Hi all! @leon sorry for some reason I just saw this. Can you please rebase and push again, and I will approve! |
@mandarini done :) |
@leon I think the staticDirs can also take a plain string instead of the |
@ChazUK Yes, this is accounted for by having the "oneOf" here |
My bad, missed that line, thank you! |
@mandarini I've noticed the build has not passed, will this effect the auto-merge? |
Head branch was pushed to by a user without write access
@mandarini I don't know why my PR didn't want to build. let me know if you want me to do something. |
Adds schema for the more advanced storybook staticDirs config defined here. https://storybook.js.org/docs/react/configure/images-and-assets
Yeey 🥳🙌 |
Ooops! Thanks @iamrommel ! @leon do you want to look into this? Or should I? |
When I did the PR it was only to fix that you could not pass along multiple strings via the nx storybook plugin. It's up to you to choose where you want to add the staticDirs setting. the reason for nx having the option in their config, is so you can have multiple configurations and setup different staticDirs depending on stage, prod environments. but I generally think it's better to keep it as close to the authors standard as possible, because their documentation is often better kept. So to your problem. |
I chose to add it on the main.js, and as you can see from the project.json
(as shown from the previous image), there is nothing there defined about
staticDirs, but still I have issues. It was working fine on 13.8.5 and not
on 13.8.7
*Rommel C. Manalo*
…On Fri, Mar 11, 2022 at 10:15 PM Leon Radley ***@***.***> wrote:
@mandarini <https://github.com/mandarini> @iamrommel
<https://github.com/iamrommel>
When I did the PR it was only to fix that you could not pass along
multiple strings via the nx storybook plugin.
It's up to you to choose where you want to add the staticDirs setting.
the reason for nx having the option in their config, is so you can have
multiple configurations and setup different staticDirs depending on stage,
prod environments.
but I generally think it's better to keep it as close to the authors
standard as possible, because their documentation is often better kept.
So to your problem.
just choose where you want to add it and remove it from the other place
and you will be fine 👍🏻
—
Reply to this email directly, view it on GitHub
<#8885 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABLI4NX6TKQOFWNTWIX4ITU7NIRVANCNFSM5NXO4H6Q>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
The same happens for me. When I trying to pass So its impossible to use not deprecated filed Please fix it or just remove default value from $schema for deprecated field |
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. |
Storybook has renamed staticDir to staticDirs.
The have also added a way to specify an object:
This PR adds the schema for staticDirs, and x-deprecates staticDir.
I don't know if we should do this, because they just fallback if they find staticDir
https://github.com/storybookjs/storybook/blob/92b23c080d03433765cbc7a60553d036a612a501/lib/core-server/src/utils/server-statics.ts#L30
Background
I needed to copy multiple directories and rename them.
the current string[] makes this impossible.
Questions
staticDir
?