Questions: Web components HMR for v5.3.4
See original GitHub issueDear Maintainers,
With v5.3.x
came new setup, particularly, import stories into main.js
.
Thus HMR approach for Web Components no longer works for '@storybook/html'
Are there any workarounds?
Issue Analytics
- State:
- Created 4 years ago
- Comments:19 (15 by maintainers)
Top Results From Across the Web
Web Components - MDN Web Docs - Mozilla
Web Components is a suite of different technologies allowing you to create reusable custom elements — with their functionality encapsulated ...
Read more >Development: Hot Module Replacement
Web component HMR works by replacing class references and instance prototype chains with proxies. Whenever a class or a property on the prototype...
Read more >A Complete Introduction to Web Components in 2022 - Kinsta
Web Components are a standard way to create reusable and modular HTML elements without using a JavaScript framework.
Read more >Is there any CSS hot reload solution for the Web components?
There is no out-of-box solution for HMR with Web Components in General. It really depends on how you are using Web Components.
Read more >Hot Module Reload - FAST design system
To learn more about HMR for Web Components and to see how to setup HMR in your own FAST projects, please see the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’ll put up a PR
For vanilla storybook (e.g. html) here’s a workaround for live reload in the meantime.
npm install --save-dev webpack-livereload-plugin
In
.storybook/main.js
:2a.
const LiveReloadPlugin = require('webpack-livereload-plugin');
2b. Edit the webpack config.
config
, here is the thing passed towebpackFinal
inmodule.exports
In
.storybook/preview-head.html
add:<script src="http://localhost:35729/livereload.js"></script>