Skip to content

Commit 2c9de97

Browse files
Timeless0911pmmmwh
andauthored
Update loader/index.js
Co-authored-by: Michael Mok <pmmmwh@gmail.com>
1 parent 2502358 commit 2c9de97

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

loader/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function ReactRefreshLoader(source, inputSourceMap, meta) {
4646

4747
// When available, use `__webpack_global__` which is a stable runtime function to use `__webpack_require__` in this compilation
4848
// See: https://github.com/webpack/webpack/issues/20139
49-
const RefreshGlobals = `(typeof __webpack_global__ === 'function' ? __webpack_global__ : __webpack_require__)`;
49+
const RefreshGlobals = `(typeof __webpack_global__ !== 'undefined' ? __webpack_global__ : __webpack_require__)`;
5050

5151
const RefreshSetupRuntimes = {
5252
cjs: Template.asString(

0 commit comments

Comments
 (0)