File tree 4 files changed +32
-2
lines changed 4 files changed +32
-2
lines changed Original file line number Diff line number Diff line change
1
+ // @remove -on-eject-begin
2
+ /**
3
+ * Copyright (c) 2015-present, Facebook, Inc.
4
+ *
5
+ * This source code is licensed under the MIT license found in the
6
+ * LICENSE file in the root directory of this source tree.
7
+ */
8
+ // @remove -on-eject-end
9
+ 'use strict' ;
10
+
11
+ const {
12
+ dismissRuntimeErrors,
13
+ reportRuntimeError,
14
+ } = require ( 'react-error-overlay' ) ;
15
+
16
+ module . exports = {
17
+ clearRuntimeErrors : dismissRuntimeErrors ,
18
+ handleRuntimeError : reportRuntimeError ,
19
+ } ;
Original file line number Diff line number Diff line change @@ -51,7 +51,7 @@ export function reportBuildError(error: string) {
51
51
52
52
export function reportRuntimeError (
53
53
error : Error ,
54
- options ?: RuntimeReportingOption = { }
54
+ options : RuntimeReportingOptions = { }
55
55
) {
56
56
currentRuntimeErrorOptions = options ;
57
57
crashWithFrames ( handleRuntimeError ( options ) ) ( error ) ;
Original file line number Diff line number Diff line change @@ -636,7 +636,7 @@ module.exports = function (webpackEnv) {
636
636
// during a production build.
637
637
// Otherwise React will be compiled in the very slow development mode.
638
638
new webpack . DefinePlugin ( env . stringified ) ,
639
- // This is necessary to emit hot updates (currently CSS only ):
639
+ // This is necessary to emit hot updates (CSS and Fast Refresh ):
640
640
isEnvDevelopment && new webpack . HotModuleReplacementPlugin ( ) ,
641
641
// Experimental hot reloading for React .
642
642
// https://github.com/facebook/react/tree/master/packages/react-refresh
@@ -645,6 +645,12 @@ module.exports = function (webpackEnv) {
645
645
new ReactRefreshWebpackPlugin ( {
646
646
overlay : {
647
647
entry : webpackDevClientEntry ,
648
+ // The expected exports are slightly different from what the overlay exports,
649
+ // so an interop is included here to enable feedback on module-level errors.
650
+ module : require . resolve ( 'react-dev-utils/refreshOverlayInterop' ) ,
651
+ // Since we ship a custom dev client and overlay integration,
652
+ // the bundled socket handling logic can be eliminated.
653
+ sockIntegration : false ,
648
654
} ,
649
655
} ) ,
650
656
// Watcher doesn't work well if you mistype casing in a path so we use
Original file line number Diff line number Diff line change 29
29
"types" : " ./lib/react-app.d.ts" ,
30
30
"dependencies" : {
31
31
"@babel/core" : " 7.10.5" ,
32
+ <<<<<<< HEAD
32
33
"@pmmmwh/react-refresh-webpack-plugin" : " 0.4.0-beta.8" ,
33
34
"@babel/plugin-syntax-bigint" : " ^7.8.3" ,
35
+ =======
36
+ "@babel/plugin-syntax-bigint" : " ^7.8.3" ,
37
+ "@pmmmwh/react-refresh-webpack-plugin" : " 0.4.1" ,
38
+ >>>>>>> 66bf7dfc... feat: better refresh plugin integration (#9375)
34
39
"@svgr/webpack" : " 5.4.0" ,
35
40
"@typescript-eslint/eslint-plugin" : " ^3.3.0" ,
36
41
"@typescript-eslint/parser" : " ^3.3.0" ,
You can’t perform that action at this time.
0 commit comments