Skip to content

Commit

Permalink
Use import.meta.webpackHot instead of module.hot for check
Browse files Browse the repository at this point in the history
  • Loading branch information
halkeye committed Nov 2, 2022
1 parent b298a49 commit 2f676a2
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ window.__STORYBOOK_CLIENT_API__ = new ClientApi({ storyStore: preview.storyStore

preview.initialize({ importFn, getProjectAnnotations });

if (module.hot) {
if (import.meta.webpackHot) {
import.meta.webpackHot.accept('./{{storiesFilename}}', () => {
// importFn has changed so we need to patch the new one in
preview.onStoriesChanged({ importFn });
Expand Down

0 comments on commit 2f676a2

Please sign in to comment.