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

Sandboxes: Fix up stories entry to allow HMR #19750

Merged
merged 6 commits into from
Nov 7, 2022

Conversation

tmeasday
Copy link
Member

@tmeasday tmeasday commented Nov 4, 2022

Issue: watchpack doesn't cross symlink boundaries, so changes inside symlinks weren't getting detected.

What I did

  • Set up a entry & watch for each link in template/stories rather than one for all
  • Use a better glob to match .mdx
  • This actually helped resolved some issues with wonky titles for a few files.

Note the issue still remains for things linked inside stories (ie. renderer/framework stories). We could do the same for those but we would have to mess a bit with the original glob to stop it from matching the renderer's stories twice. Should we do that @shilman?

How to test

  • Check we haven't lost any stories in Chromatic
  • Run a sandbox, add a story in lib/store/template/stories/basic.stories.ts

@tmeasday tmeasday added the build Internal-facing build tooling & test updates label Nov 4, 2022
@tmeasday tmeasday requested a review from shilman November 4, 2022 05:27
Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

LGTM. Let's start with this and see how annoying the other stories are. We can revisit if needed.

@tmeasday tmeasday merged commit 8ce29a0 into next Nov 7, 2022
@tmeasday tmeasday deleted the tom/sb-754-hmr-does-not-detect-addedremoved-stories branch November 7, 2022 03:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Internal-facing build tooling & test updates
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants