Commit de70065 1 parent 144dd56 commit de70065 Copy full SHA for de70065
File tree 4 files changed +28
-3
lines changed
4 files changed +28
-3
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 @@ -634,7 +634,7 @@ module.exports = function (webpackEnv) {
634
634
// during a production build.
635
635
// Otherwise React will be compiled in the very slow development mode.
636
636
new webpack . DefinePlugin ( env . stringified ) ,
637
- // This is necessary to emit hot updates (currently CSS only ):
637
+ // This is necessary to emit hot updates (CSS and Fast Refresh ):
638
638
isEnvDevelopment && new webpack . HotModuleReplacementPlugin ( ) ,
639
639
// Experimental hot reloading for React .
640
640
// https://github.com/facebook/react/tree/master/packages/react-refresh
@@ -643,6 +643,12 @@ module.exports = function (webpackEnv) {
643
643
new ReactRefreshWebpackPlugin ( {
644
644
overlay : {
645
645
entry : webpackDevClientEntry ,
646
+ // The expected exports are slightly different from what the overlay exports,
647
+ // so an interop is included here to enable feedback on module-level errors.
648
+ module : require . resolve ( 'react-dev-utils/refreshOverlayInterop' ) ,
649
+ // Since we ship a custom dev client and overlay integration,
650
+ // the bundled socket handling logic can be eliminated.
651
+ sockIntegration : false ,
646
652
} ,
647
653
} ) ,
648
654
// 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
- "@pmmmwh/react-refresh-webpack-plugin" : " 0.4.0-beta.8 " ,
32
+ "@pmmmwh/react-refresh-webpack-plugin" : " 0.4.1 " ,
33
33
"@svgr/webpack" : " 5.4.0" ,
34
34
"@typescript-eslint/eslint-plugin" : " ^3.3.0" ,
35
35
"@typescript-eslint/parser" : " ^3.3.0" ,
You can’t perform that action at this time.
0 commit comments