-
-
Notifications
You must be signed in to change notification settings - Fork 9.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
Web-components: Add full reload listening to server-side-events #14445
Web-components: Add full reload listening to server-side-events #14445
Conversation
@@ -12,6 +13,6 @@ module.exports = { | |||
'@storybook/addon-viewport', | |||
], | |||
core: { | |||
builder: 'webpack4', | |||
builder: 'webpack5', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK we can't use this in the monorepo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @brion-fuller!! @gaetanmaisse the CI results looks like an intermittent NPM failure so I'm merging anyway.
Thank you @brion-fuller confirmed this works with vanilla custom elements. |
Issue: #12307
Web components cannot be hot reloaded as customElement.define can only be called once per page with an unique string. This has been on the users to add to their config file. Now this is available for free.
What I did
I hooked into server-sent events for webpack HMR and listen for the built event in which I trigger a page reload.
How to test
Is this testable with Jest or Chromatic screenshots? no
Does this need a new example in the kitchen sink apps? no
Does this need an update to the documentation? yes