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

fix(storybook): handle defaultProject issues with projectBuildConfig flag #8494

Merged
merged 1 commit into from
Jan 17, 2022

Conversation

mandarini
Copy link
Member

@mandarini mandarini commented Jan 12, 2022

Current Behavior

Storybook uses the build config of the default project as specified in nx.json and it can lead to issues. Also, if there is no default project specified, Storybook breaks.

Expected Behavior

  • Provide a better error message when there's no default project - explain what the user should do
  • Provide a warning when the projectBuildConfig is not specified - explain what the user should do
  • Create a migrator to add the projectBuildConfig in the project's Storybook configuration
  • Adjusted storybook-configuration generator to add projectBuildConfig option under the storybook and build-storybook targets in new project configurations

Related Issue(s)

Potentially linked to the Storybook+Angular 13 issues. Will of course check back if bugs persist.
I know some of these are older than Angular 13, but most of these seem related to the defaultProject issue.

#8199
#8527
storybookjs/storybook#16977
#7897
#7159
#8527
#8373
#8360
#8255
#8115
#8561

Fixes #

@vercel
Copy link

vercel bot commented Jan 12, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/nrwl/nx-dev/xjXoYFwitfueULUWjEDLH4JRmP6X
✅ Preview: https://nx-dev-git-fork-mandarini-fix-storybook-use-project-nrwl.vercel.app

[Deployment for d7ef23a canceled]

@juristr juristr self-requested a review January 12, 2022 19:02
Copy link
Member

@juristr juristr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(let's discuss the changes :) )

@mandarini mandarini linked an issue Jan 14, 2022 that may be closed by this pull request
…flag

* fix(storybook): better error logging for missing projectBuildConfig

* feat(storybook): migrator to add projectBuildConfig

* fix(storybook): set projectBuildConfig in storybook configuration generator

* fix(storybook): find the correct targets for build and storybook
Copy link
Member

@juristr juristr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mandarini mandarini merged commit dcb839c into nrwl:master Jan 17, 2022
@mandarini mandarini deleted the fix/storybook-use-project branch March 18, 2022 14:47
@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.