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): ensure watch is passed to angular storybook options #8800

Merged
merged 1 commit into from
Feb 1, 2022

Conversation

Coly010
Copy link
Contributor

@Coly010 Coly010 commented Feb 1, 2022

Current Behavior

Hot Reload does not work with Angular 13

Expected Behavior

Hot Reload works with Angular 13

Explanation

Storybook's app/angular/src/server/framework-preset-angular-cli.ts file has code in it that merges three configs.

It merges in the following order

  • Config that is passed to the function
  • Config it reads from the Browser Build target that it reads from the angular.json/workspace.json/project.json
  • Additional Config Options from a new object angularBuilderOptions that was introduced in this commit: storybookjs/storybook@8704f84

We were passing watch: true from our executor, but it was being overridden by the watch value it was reading from the angular.json/workspace.json/project.json. This is partially because the default build configuration for Angular apps is now production.

Storybook providing the angularBuilderOptions and merging it last gave us an option to pass the watch flag using it.

Related Issue(s)

Fixes #8484

@Coly010 Coly010 requested a review from mandarini February 1, 2022 10:26
@Coly010 Coly010 self-assigned this Feb 1, 2022
@vercel
Copy link

vercel bot commented Feb 1, 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/9WNMJThj3qR38Q9SHCkdeCnCYAaj
✅ Preview: Canceled

[Deployment for 23b6c76 canceled]

@mandarini
Copy link
Member

Tested it locally, works great! LGTM! :)

Copy link
Member

@mandarini mandarini left a comment

Choose a reason for hiding this comment

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

Looks good to me! :)

@mandarini mandarini enabled auto-merge (squash) February 1, 2022 10:38
@Coly010 Coly010 force-pushed the storybook/fix-angular-hmr branch from ab2e5fc to 23b6c76 Compare February 1, 2022 11:17
@mandarini mandarini merged commit 19f8813 into nrwl:master Feb 1, 2022
@Coly010 Coly010 deleted the storybook/fix-angular-hmr branch February 1, 2022 11:53
@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.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Storybook doesn't run in dev mode with hot reload like start-storybook
2 participants