@pmmmwh/react-refresh-webpack-plugin
Advanced tools
Comparing version 0.5.0-rc.1 to 0.5.0-rc.2
@@ -5,3 +5,4 @@ /* global __react_refresh_error_overlay__, __react_refresh_socket__, __resourceQuery */ | ||
import formatWebpackErrors from './utils/formatWebpackErrors.js'; | ||
import runWithPatchedUrl from './utils/patchUrl.js'; | ||
import runWithPatchedUrl from './utils/patchUrl.cjs'; | ||
import runWithRetry from './utils/retry.js'; | ||
@@ -79,4 +80,7 @@ // Setup error states | ||
if (!window.__reactRefreshOverlayInjected && __react_refresh_socket__) { | ||
// Registers handlers for compile errors | ||
__react_refresh_socket__.init(compileMessageHandler, __resourceQuery); | ||
// Registers handlers for compile errors with retry - | ||
// This is to prevent mismatching injection order causing errors to be thrown | ||
runWithRetry(function initSocket() { | ||
__react_refresh_socket__.init(compileMessageHandler, __resourceQuery); | ||
}, 3); | ||
// Registers handlers for runtime errors | ||
@@ -83,0 +87,0 @@ handleError(function handleError(error) { |
@@ -40,3 +40,3 @@ const { getRefreshGlobalScope } = require('../globals'); | ||
webpack.Template.indent([ | ||
`if (moduleObject.exports instanceof ${webpack.RuntimeGlobals.global}.Promise) {`, | ||
`if (typeof Promise !== 'undefined' && moduleObject.exports instanceof Promise) {`, | ||
webpack.Template.indent([ | ||
@@ -43,0 +43,0 @@ // Ponyfill `Promise.finally` as it is only part of the spec after ES2018, |
{ | ||
"name": "@pmmmwh/react-refresh-webpack-plugin", | ||
"version": "0.5.0-rc.1", | ||
"version": "0.5.0-rc.2", | ||
"description": "An **EXPERIMENTAL** Webpack plugin to enable \"Fast Refresh\" (also previously known as _Hot Reloading_) for React components.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
122856
56
3007