-
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
Storybook - forward Storybook's native parameters in CLI #7531
Comments
Hi, are there any updates on it? |
any feedback will be appreciated 🙃 @mandarini |
Hi there! No news on that yet. It's a feature request, and we're prioritizing bugs at the moment. I will let you know. However, in the meantime, if any of you would like to give this a shot, let me know, and I can help you! :) |
Sure thing. |
Hi there, on second thoughts, I think that the native parameter forwarding should work as it is now. They may not appear in our schema, but I think they are forwarded. @danr-za can you give it a try and let me know? I mean, just pass the parameters as you would normally, and observe if they work or not.. |
@mandarini I tried with:
|
Hi there @danr-za ! :) I am in the process of changing our |
@danr-za @cakeinpanic Oh, also, btw, did you try adding these options in the |
@mandarini nope, just in the cli (but I guess both should be supported) |
Hi @danr-za ! I checked today, and I could not reproduce. I mean, I tried passing a number of parameters (either them being in our schema or not) and they all worked, except the |
ye, hope I can take it this week. |
Perfect, thanks @danr-za ! btw, I debugged this during my last stream, if you care to see the whole debugging process. |
I'm linking this PR here since it's related (only for the |
I am closing this, since I am 99.9% sure that it works as expected with all the latest changes. Please feel free to reopen, after you test with latest version of Nx! Thank you all! |
Hi @mandarini I don't believe this is working as expected -- unless, of course, we expect different things :) For example, if you have the following script in your {
"scripts": {
"build-storybook": "nx build-storybook my-app",
}
} and you run npm run build-storybook -- --webpack-stats-json The We are able to work around it by adding the necessary config ( The npm run --silent build-storybook -- --output-dir /tmp/chromatic--1761-OSRHsIVpk1KR --webpack-stats-json /tmp/chromatic--1761-OSRHsIVpk1KR but then spits out a warning saying that the storybook did not get built in the expected I believe this qualifies as unexpected behaviour - would you agree? |
Hey @janeklb sorry just seeing this. I promise to look into it this week! |
Could NX make it visible in the documentation for the executor? This behavior is not obvious. |
Sure, I'll make sure to update it next week. Thanks for the feedback! |
@janeklb I pushed a fix (we're not overriding I will eventually fix the docs with some examples. |
ISSUES CLOSED: nrwl#7531
ISSUES CLOSED: nrwl#7531
ISSUES CLOSED: nrwl#7531
Thanks @mandarini! The fix (#12238) doesn't seem to enable all CLI arguments to be passed to the storybook builder. It does solve my specific problem; however, I'm now just curious if this is intentional or simply just not something that's been worked out? |
Oh @janeklb you see these two arguments are the only ones we override. All the rest we are passing them as they are! |
@janeklb if you look at the same file, a few lines above:
take note at:
We are passing all the builder options as they are. No changes. However, below, we are were overriding |
Thank you for taking the time to explain - much appreciated :) |
:D |
I can confirm the only way I've found to make the TurboSnap feature to work along with nx is by directly adding the webpackStatsJson option here: It seems the option Here is my github CI workflow for Chromatic by the way: https://github.com/sebpalluel/web3-monorepo/blob/main/.github/workflows/chromatic-web.yml And the script to build only the storybook of my web app: That way I can have multiple instances of storybook as described in the chromatic guideline for monorepo: |
This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context. |
Description
Storybook supports various parameters such as
output-dir
(which is for example needed by Chromatic), log-level, opening the browser, ssl and others.It would be helpful to simply forward them when using nx storybook cli.
Motivation
Native Storybook support
The text was updated successfully, but these errors were encountered: