Skip to content
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

Setting projectBuildConfig in Storybook Generator does not work as expected #10090

Closed
SuneRadich opened this issue May 2, 2022 · 3 comments
Closed
Assignees
Labels
outdated scope: storybook Issues related to Storybook support in Nx type: bug

Comments

@SuneRadich
Copy link

I was part of the discussion that lead to #9655 and now I am trying to use the changes that were released from that PR.

Current Behavior

After updating to 13.10.3, and trying to set projectBuildConfig in the Storybook Generator (@nrwl/angular:storybook-configuration) the value set does not seem to have any effect in the resulting project.json. I set the value using the VS Code nx console gui, and have tried to set it using defaults in nx.json like

    "@nrwl/angular:storybook-configuration": {
      "projectBuildConfig": "storybook:build"
    },

I can see the value in the gui in both cases, but it is as if the value is treated as being blank, ie. the generated file contains the default value for projectBuildConfig and not the value I input.

Expected Behavior

I would have expected the value entered as the value for projectBuildConfig would override the default value, and would be output in the resulting project.json file.

Steps to Reproduce

When on nx 13.10.3, initiate the generator @nrwl/angular:storybook-configuration
Input a value for projectBuildConfig (I am using the VS Code nx console and the gui provided)
Run the generator

Eventhough I entered a valid value for projectBuildConfig, the resulting project.json contains the default value (pointing to the lib/app itself)

If I however, add a custom default value for projectBuildConfig for the general storybook generator

"@nrwl/storybook:configuration": {
      "projectBuildConfig": "storybook:build"
    }

And then run this generator on my lib, then I can see my custom value for projectBuildConfig in the generated project.json. The weird part is, that this generator does not seem to have this config option, so perhaps it just pass it on to the @nrwl/angular:storybook-configuration?

It seems as if the angular storybook generator have the config option, but is unable to use it, but that the general storybook generator does not have the config option, but use it anyway if it exist.

Environment

NX Report complete - copy this into the issue template

Node : 14.19.1
OS : darwin arm64
npm : 7.24.2

nx : 13.10.3
@nrwl/angular : 13.10.3
@nrwl/cypress : 13.10.3
@nrwl/detox : Not Found
@nrwl/devkit : 13.10.3
@nrwl/eslint-plugin-nx : 13.10.3
@nrwl/express : Not Found
@nrwl/jest : 13.10.3
@nrwl/js : 13.10.3
@nrwl/linter : 13.10.3
@nrwl/nest : 13.10.3
@nrwl/next : Not Found
@nrwl/node : 13.10.3
@nrwl/nx-cloud : 14.0.3
@nrwl/nx-plugin : Not Found
@nrwl/react : Not Found
@nrwl/react-native : Not Found
@nrwl/schematics : Not Found
@nrwl/storybook : 13.10.3
@nrwl/web : Not Found
@nrwl/workspace : 13.10.3
typescript : 4.6.4
rxjs : 7.5.5

Community plugins:
@ngneat/transloco: 2.23.5
@ngrx/effects: 13.0.2
@ngrx/entity: 13.0.2
@ngrx/router-store: 13.0.2
@ngrx/store: 13.0.2
@ngrx/schematics: 13.0.2
@ngrx/store-devtools: 13.0.2
@storybook/angular: 6.4.19
@twittwer/compodoc: 1.6.6

@AgentEnder AgentEnder added the scope: storybook Issues related to Storybook support in Nx label May 2, 2022
@mandarini mandarini assigned mandarini and unassigned mandarini May 3, 2022
@mandarini
Copy link
Member

mandarini commented May 19, 2022

Hi there! We just merged a PR that will use the native Storybook Angular executor from now on. So you should expect this to work out of the box, just like it does in native Storybook setups!

@mandarini
Copy link
Member

I will close this, but please feel free to reopen after the new version of Nx comes out and you get to try out the new setup! Thanks for reporting this!

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: storybook Issues related to Storybook support in Nx type: bug
Projects
None yet
Development

No branches or pull requests

3 participants