Skip to content

Commit

Permalink
fix: make dev-server compatible with globalThis (#4087)
Browse files Browse the repository at this point in the history
* fix: make dev-server compatible with globalThis

* fix: make dev-server  globalThis =>self
  • Loading branch information
ja-plus authored Sep 1, 2023
1 parent 6784084 commit 1156d45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/rspack-dev-client/src/reactRefreshEntry.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const RefreshRuntime = require("react-refresh/runtime");

RefreshRuntime.injectIntoGlobalHook(globalThis);
globalThis.$RefreshSig$ = RefreshRuntime.createSignatureFunctionForTransform;
RefreshRuntime.injectIntoGlobalHook(self);
self.$RefreshSig$ = RefreshRuntime.createSignatureFunctionForTransform;

0 comments on commit 1156d45

Please sign in to comment.