Skip to content

Commit

Permalink
Merge pull request #19686 from halkeye/use-import-meta
Browse files Browse the repository at this point in the history
Use import.meta.webpackHot instead of module.hot for check
  • Loading branch information
ndelangen authored Nov 2, 2022
2 parents b298a49 + 2f676a2 commit 319ec81
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 319ec81

Please sign in to comment.