Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
0d49f22e
Unverified
Commit
0d49f22e
authored
May 15, 2020
by
Joe Haddad
Committed by
GitHub
May 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove `react-error-overlay` (#12942)
parent
9c799550
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
37 additions
and
319 deletions
+37
-319
entries.ts
packages/next/build/entries.ts
+0
-6
webpack-config.ts
packages/next/build/webpack-config.ts
+1
-4
base.ts
packages/next/build/webpack/config/blocks/base.ts
+10
-16
index.ts
packages/next/build/webpack/config/index.ts
+0
-3
utils.ts
packages/next/build/webpack/config/utils.ts
+0
-1
next-client-pages-loader.ts
...es/next/build/webpack/loaders/next-client-pages-loader.ts
+2
-11
hot-dev-client.js
packages/next/client/dev/error-overlay/hot-dev-client.js
+5
-117
source-map-support.ts
packages/next/client/dev/error-overlay/source-map-support.ts
+0
-28
index.js
packages/next/client/index.js
+15
-27
config.ts
packages/next/next-server/server/config.ts
+0
-1
package.json
packages/next/package.json
+0
-1
error-debug.tsx
packages/next/server/error-debug.tsx
+0
-74
hot-reloader.ts
packages/next/server/hot-reloader.ts
+0
-1
next-dev-server.ts
packages/next/server/next-dev-server.ts
+1
-5
on-demand-entry-handler.ts
packages/next/server/on-demand-entry-handler.ts
+0
-3
taskfile.js
packages/next/taskfile.js
+1
-14
index.test.js
test/integration/client-navigation/test/index.test.js
+2
-2
yarn.lock
yarn.lock
+0
-5
No files found.
packages/next/build/entries.ts
View file @
0d49f22e
...
...
@@ -133,12 +133,6 @@ export function createEntrypoints(
const
pageLoaderOpts
:
ClientPagesLoaderOptions
=
{
page
,
absolutePagePath
,
hotRouterUpdates
:
// Hot router updates only apply in development mode
dev
&&
// However, React Refresh has its own hot module runtime, so we can't
// let them collide.
config
.
experimental
.
reactRefresh
!==
true
,
}
const
pageLoader
=
`next-client-pages-loader?
${
stringify
(
pageLoaderOpts
...
...
packages/next/build/webpack-config.ts
View file @
0d49f22e
...
...
@@ -153,8 +153,7 @@ export default async function getBaseWebpackConfig(
}
}
const
isReactRefreshEnabled
=
config
.
experimental
.
reactRefresh
===
true
const
hasReactRefresh
=
dev
&&
!
isServer
&&
isReactRefreshEnabled
const
hasReactRefresh
=
dev
&&
!
isServer
const
distDir
=
path
.
join
(
dir
,
config
.
distDir
)
const
defaultLoaders
=
{
...
...
@@ -844,7 +843,6 @@ export default async function getBaseWebpackConfig(
'process.env.__NEXT_ROUTER_BASEPATH'
:
JSON
.
stringify
(
config
.
experimental
.
basePath
),
'process.env.__NEXT_FAST_REFRESH'
:
JSON
.
stringify
(
hasReactRefresh
),
...(
isServer
?
{
// Fix bad-actors in the npm ecosystem (e.g. `node-formidable`)
...
...
@@ -1032,7 +1030,6 @@ export default async function getBaseWebpackConfig(
customAppFile
,
isDevelopment
:
dev
,
isServer
,
isReactRefreshEnabled
,
assetPrefix
:
config
.
assetPrefix
||
''
,
sassOptions
:
config
.
sassOptions
,
})
...
...
packages/next/build/webpack/config/blocks/base.ts
View file @
0d49f22e
...
...
@@ -12,23 +12,17 @@ export const base = curry(function base(
// https://webpack.js.org/configuration/devtool/#development
if
(
ctx
.
isDevelopment
)
{
if
(
ctx
.
isReactRefreshEnabled
)
{
if
(
ctx
.
isServer
||
process
.
platform
===
'win32'
)
{
// Non-eval based source maps are slow to rebuild, so we only enable
// them for the server and Windows. Unfortunately, eval source maps
// are not supported by Node.js, and are slow on Windows.
config
.
devtool
=
'inline-source-map'
}
else
{
// `eval-source-map` provides full-fidelity source maps for the
// original source, including columns and original variable names.
// This is desirable so the in-browser debugger can correctly pause
// and show scoped variables with their original names.
config
.
devtool
=
'eval-source-map'
}
if
(
ctx
.
isServer
||
process
.
platform
===
'win32'
)
{
// Non-eval based source maps are slow to rebuild, so we only enable
// them for the server and Windows. Unfortunately, eval source maps
// are not supported by Node.js, and are slow on Windows.
config
.
devtool
=
'inline-source-map'
}
else
{
// `cheap-module-source-map` is the old preferred format that was
// required for `react-error-overlay`.
config
.
devtool
=
'cheap-module-source-map'
// `eval-source-map` provides full-fidelity source maps for the
// original source, including columns and original variable names.
// This is desirable so the in-browser debugger can correctly pause
// and show scoped variables with their original names.
config
.
devtool
=
'eval-source-map'
}
}
else
{
config
.
devtool
=
false
...
...
packages/next/build/webpack/config/index.ts
View file @
0d49f22e
...
...
@@ -10,7 +10,6 @@ export async function build(
customAppFile
,
isDevelopment
,
isServer
,
isReactRefreshEnabled
,
assetPrefix
,
sassOptions
,
}:
{
...
...
@@ -18,7 +17,6 @@ export async function build(
customAppFile
:
string
|
null
isDevelopment
:
boolean
isServer
:
boolean
isReactRefreshEnabled
:
boolean
assetPrefix
:
string
sassOptions
:
any
}
...
...
@@ -28,7 +26,6 @@ export async function build(
customAppFile
,
isDevelopment
,
isProduction
:
!
isDevelopment
,
isReactRefreshEnabled
,
isServer
,
isClient
:
!
isServer
,
assetPrefix
:
assetPrefix
...
...
packages/next/build/webpack/config/utils.ts
View file @
0d49f22e
...
...
@@ -6,7 +6,6 @@ export type ConfigurationContext = {
isDevelopment
:
boolean
isProduction
:
boolean
isReactRefreshEnabled
:
boolean
isServer
:
boolean
isClient
:
boolean
...
...
packages/next/build/webpack/loaders/next-client-pages-loader.ts
View file @
0d49f22e
...
...
@@ -4,11 +4,10 @@ import loaderUtils from 'loader-utils'
export
type
ClientPagesLoaderOptions
=
{
absolutePagePath
:
string
page
:
string
hotRouterUpdates
:
boolean
}
const
nextClientPagesLoader
:
loader
.
Loader
=
function
()
{
const
{
absolutePagePath
,
page
,
hotRouterUpdates
}
=
loaderUtils
.
getOptions
(
const
{
absolutePagePath
,
page
}
=
loaderUtils
.
getOptions
(
this
)
as
ClientPagesLoaderOptions
const
stringifiedAbsolutePagePath
=
JSON
.
stringify
(
absolutePagePath
)
...
...
@@ -18,15 +17,7 @@ const nextClientPagesLoader: loader.Loader = function() {
(window.__NEXT_P = window.__NEXT_P || []).push([
${
stringifiedPage
}
,
function () {
var mod = require(
${
stringifiedAbsolutePagePath
}
);
if (
${
!!
hotRouterUpdates
}
&& module.hot) {
module.hot.accept(
${
stringifiedAbsolutePagePath
}
, function () {
if (!next.router.components[
${
stringifiedPage
}
]) return;
var updatedPage = require(
${
stringifiedAbsolutePagePath
}
);
next.router.update(
${
stringifiedPage
}
, updatedPage);
});
}
return mod;
return require(
${
stringifiedAbsolutePagePath
}
);
}
]);
`
...
...
packages/next/client/dev/error-overlay/hot-dev-client.js
View file @
0d49f22e
...
...
@@ -27,12 +27,9 @@
// https://github.com/facebook/create-react-app/blob/v3.4.1/packages/react-dev-utils/webpackHotDevClient.js
import
*
as
DevOverlay
from
'@next/react-dev-overlay/lib/client'
import
fetch
from
'next/dist/build/polyfills/unfetch'
import
*
as
ErrorOverlay
from
'next/dist/compiled/react-error-overlay'
import
stripAnsi
from
'next/dist/compiled/strip-ansi'
import
{
getEventSourceWrapper
}
from
'./eventsource'
import
formatWebpackMessages
from
'./format-webpack-messages'
import
{
rewriteStacktrace
}
from
'./source-map-support'
// This alternative WebpackDevServer combines the functionality of:
// https://github.com/webpack/webpack-dev-server/blob/webpack-1/client/index.js
...
...
@@ -46,37 +43,7 @@ import { rewriteStacktrace } from './source-map-support'
let
hadRuntimeError
=
false
let
customHmrEventHandler
export
default
function
connect
(
options
)
{
// Open stack traces in an editor.
ErrorOverlay
.
setEditorHandler
(
function
editorHandler
({
fileName
,
lineNumber
,
colNumber
,
})
{
// Resolve invalid paths coming from react-error-overlay
const
resolvedFilename
=
fileName
.
replace
(
/^webpack:
\/\/
/
,
''
)
fetch
(
'/_next/development/open-stack-frame-in-editor'
+
`?fileName=
${
window
.
encodeURIComponent
(
resolvedFilename
)}
`
+
`&lineNumber=
${
lineNumber
||
1
}
`
+
`&colNumber=
${
colNumber
||
1
}
`
)
})
if
(
process
.
env
.
__NEXT_FAST_REFRESH
)
{
DevOverlay
.
register
()
}
else
{
// We need to keep track of if there has been a runtime error.
// Essentially, we cannot guarantee application state was not corrupted by the
// runtime error. To prevent confusing behavior, we forcibly reload the entire
// application. This is handled below when we are notified of a compile (code
// change).
// See https://github.com/facebook/create-react-app/issues/3096
ErrorOverlay
.
startReportingRuntimeErrors
({
onError
:
function
()
{
hadRuntimeError
=
true
},
})
}
DevOverlay
.
register
()
getEventSourceWrapper
(
options
).
addMessageListener
(
event
=>
{
// This is the heartbeat event
...
...
@@ -97,25 +64,6 @@ export default function connect(options) {
onUnrecoverableError
()
{
hadRuntimeError
=
true
},
reportRuntimeError
(
err
)
{
if
(
process
.
env
.
__NEXT_FAST_REFRESH
)
{
return
}
ErrorOverlay
.
reportRuntimeError
(
err
)
},
prepareError
(
err
)
{
// Temporary workaround for https://github.com/facebook/create-react-app/issues/4760
// Should be removed once the fix lands
hadRuntimeError
=
true
// react-error-overlay expects a type of `Error`
const
error
=
new
Error
(
err
.
message
)
error
.
name
=
err
.
name
error
.
stack
=
err
.
stack
// __NEXT_DIST_DIR is provided by webpack
rewriteStacktrace
(
error
,
process
.
env
.
__NEXT_DIST_DIR
)
return
error
},
}
}
...
...
@@ -123,7 +71,6 @@ export default function connect(options) {
var
isFirstCompilation
=
true
var
mostRecentCompilationHash
=
null
var
hasCompileErrors
=
false
var
hmrEventCount
=
0
function
clearOutdatedErrors
()
{
// Clean up outdated compile errors, if any.
...
...
@@ -207,11 +154,7 @@ function handleErrors(errors) {
})
// Only show the first error.
if
(
process
.
env
.
__NEXT_FAST_REFRESH
)
{
DevOverlay
.
onBuildError
(
formatted
.
errors
[
0
])
}
else
{
ErrorOverlay
.
reportBuildError
(
formatted
.
errors
[
0
])
}
DevOverlay
.
onBuildError
(
formatted
.
errors
[
0
])
// Also log them to the console.
if
(
typeof
console
!==
'undefined'
&&
typeof
console
.
error
===
'function'
)
{
...
...
@@ -230,21 +173,10 @@ function handleErrors(errors) {
}
}
function
tryDismissErrorOverlay
()
{
if
(
!
process
.
env
.
__NEXT_FAST_REFRESH
)
{
if
(
!
hasCompileErrors
)
{
ErrorOverlay
.
dismissBuildError
()
}
}
}
function
onFastRefresh
(
hasUpdates
)
{
tryDismissErrorOverlay
()
if
(
process
.
env
.
__NEXT_FAST_REFRESH
)
{
DevOverlay
.
onBuildOk
()
if
(
hasUpdates
)
{
DevOverlay
.
onRefresh
()
}
DevOverlay
.
onBuildOk
()
if
(
hasUpdates
)
{
DevOverlay
.
onRefresh
()
}
console
.
log
(
'[Fast Refresh] done'
)
...
...
@@ -261,13 +193,11 @@ function processMessage(e) {
const
obj
=
JSON
.
parse
(
e
.
data
)
switch
(
obj
.
action
)
{
case
'building'
:
{
++
hmrEventCount
console
.
log
(
'[Fast Refresh] rebuilding'
)
break
}
case
'built'
:
case
'sync'
:
{
if
(
obj
.
action
===
'built'
)
++
hmrEventCount
if
(
obj
.
hash
)
{
handleAvailableHash
(
obj
.
hash
)
}
...
...
@@ -285,48 +215,6 @@ function processMessage(e) {
return
handleSuccess
()
}
case
'typeChecked'
:
{
if
(
process
.
env
.
__NEXT_FAST_REFRESH
)
{
break
}
const
eventId
=
++
hmrEventCount
const
[{
errors
}]
=
obj
.
data
const
hasErrors
=
Boolean
(
errors
&&
errors
.
length
)
// Disregard event if there are no errors to report.
if
(
!
hasErrors
)
{
// We need to _try_ dismissing the error overlay, as code may not have
// changed, for example, when only types are updated.
// n.b. `handleSuccess` only dismisses the overlay if code was updated.
tryDismissErrorOverlay
()
break
}
function
display
()
{
// Another update has started, ignore type update:
if
(
!
canApplyUpdates
()
||
eventId
!==
hmrEventCount
)
{
return
}
// TypeScript errors to not take priority over compillation errors
if
(
hasCompileErrors
)
{
return
}
handleErrors
(
errors
)
}
// We need to defer this until we're in an idle state.
if
(
canApplyUpdates
())
{
display
()
}
else
{
afterApplyUpdates
(
display
)
}
break
}
default
:
{
if
(
customHmrEventHandler
)
{
customHmrEventHandler
(
obj
)
...
...
packages/next/client/dev/error-overlay/source-map-support.ts
deleted
100644 → 0
View file @
9c799550
const
filenameRE
=
/
\(([^
)
]
+
\.
js
)
:
(\d
+
)
:
(\d
+
)\)
$/
export
function
rewriteStacktrace
(
e
:
Error
,
distDir
:
string
)
{
if
(
!
e
||
typeof
e
.
stack
!==
'string'
)
{
return
}
const
lines
=
e
.
stack
.
split
(
'
\
n'
)
const
result
=
lines
.
map
((
line
:
string
)
=>
{
return
rewriteTraceLine
(
line
,
distDir
)
})
e
.
stack
=
result
.
join
(
'
\
n'
)
}
function
rewriteTraceLine
(
trace
:
string
,
distDir
:
string
)
{
const
m
=
trace
.
match
(
filenameRE
)
if
(
m
==
null
)
{
return
trace
}
const
filename
=
m
[
1
]
const
filenameLink
=
filename
.
replace
(
distDir
,
'/_next/development'
)
.
replace
(
/
\\
/g
,
'/'
)
trace
=
trace
.
replace
(
filename
,
filenameLink
)
return
trace
}
packages/next/client/index.js
View file @
0d49f22e
...
...
@@ -152,13 +152,8 @@ class Container extends React.Component {
return
this
.
props
.
children
}
if
(
process
.
env
.
NODE_ENV
!==
'production'
)
{
if
(
process
.
env
.
__NEXT_FAST_REFRESH
)
{
const
{
ReactDevOverlay
,
}
=
require
(
'@next/react-dev-overlay/lib/client'
)
return
<
ReactDevOverlay
>
{
this
.
props
.
children
}
<
/ReactDevOverlay
>
}
return
this
.
props
.
children
const
{
ReactDevOverlay
}
=
require
(
'@next/react-dev-overlay/lib/client'
)
return
<
ReactDevOverlay
>
{
this
.
props
.
children
}
<
/ReactDevOverlay
>
}
}
}
...
...
@@ -323,28 +318,21 @@ export async function render(props) {
export
function
renderError
(
props
)
{
const
{
App
,
err
}
=
props
// In development runtime errors are caught by
react-error-
overlay
// In development runtime errors are caught by
our
overlay
// In production we catch runtime errors using componentDidCatch which will trigger renderError
if
(
process
.
env
.
NODE_ENV
!==
'production'
)
{
if
(
process
.
env
.
__NEXT_FAST_REFRESH
)
{
// A Next.js rendering runtime error is always unrecoverable
// FIXME: let's make this recoverable (error in GIP client-transition)
webpackHMR
.
onUnrecoverableError
()
// We need to render an empty <App> so that the `<ReactDevOverlay>` can
// render itself.
return
doRender
({
App
:
()
=>
null
,
props
:
{},
Component
:
()
=>
null
,
err
:
null
,
})
}
// Legacy behavior:
return
Promise
.
resolve
(
webpackHMR
.
reportRuntimeError
(
webpackHMR
.
prepareError
(
err
))
)
// A Next.js rendering runtime error is always unrecoverable
// FIXME: let's make this recoverable (error in GIP client-transition)
webpackHMR
.
onUnrecoverableError
()
// We need to render an empty <App> so that the `<ReactDevOverlay>` can
// render itself.
return
doRender
({
App
:
()
=>
null
,
props
:
{},
Component
:
()
=>
null
,
err
:
null
,
})
}
if
(
process
.
env
.
__NEXT_PLUGINS
)
{
// eslint-disable-next-line
...
...
packages/next/next-server/server/config.ts
View file @
0d49f22e
...
...
@@ -52,7 +52,6 @@ const defaultConfig: { [key: string]: any } = {
workerThreads
:
false
,
basePath
:
''
,
pageEnv
:
false
,
reactRefresh
:
true
,
},
future
:
{
excludeDefaultMomentLocales
:
false
,
...
...
packages/next/package.json
View file @
0d49f22e
...
...
@@ -197,7 +197,6 @@
"postcss-loader"
:
"3.0.0"
,
"postcss-preset-env"
:
"6.7.0"
,
"raw-body"
:
"2.4.1"
,
"react-error-overlay"
:
"5.1.6"
,
"recast"
:
"0.18.5"
,
"resolve"
:
"1.11.0"
,
"send"
:
"0.17.1"
,
...
...
packages/next/server/error-debug.tsx
deleted
100644 → 0
View file @
9c799550
import
React
from
'react'
import
Head
from
'../next-server/lib/head'
// This component is only rendered on the server side.
export
default
function
ErrorDebug
({
error
,
info
,
}:
{
error
:
Error
info
:
any
})
{
return
(
<
div
style=
{
styles
.
errorDebug
as
object
}
>
<
Head
>
<
meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
</
Head
>
<
StackTrace
error=
{
error
}
info=
{
info
}
/>
</
div
>
)
}
const
StackTrace
=
({
error
:
{
name
,
message
,
stack
},
info
,
}:
{
error
:
Error
info
:
any
})
=>
(
<
div
>
<
div
style=
{
styles
.
heading
as
object
}
>
{
message
||
name
}
</
div
>
<
pre
style=
{
styles
.
stack
as
object
}
>
{
stack
}
</
pre
>
{
info
&&
<
pre
style=
{
styles
.
stack
as
object
}
>
{
info
.
componentStack
}
</
pre
>
}
</
div
>
)
export
const
styles
=
{
errorDebug
:
{
background
:
'#ffffff'
,
boxSizing
:
'border-box'
,
overflow
:
'auto'
,
padding
:
'24px'
,
position
:
'fixed'
,
left
:
0
,
right
:
0
,
top
:
0
,
bottom
:
0
,
zIndex
:
9999
,
color
:
'#000000'
,
},
stack
:
{
fontFamily
:
'"SF Mono", "Roboto Mono", "Fira Mono", consolas, menlo-regular, monospace'
,
fontSize
:
'13px'
,
lineHeight
:
'18px'
,
color
:
'#777'
,
margin
:
0
,
whiteSpace
:
'pre-wrap'
,
wordWrap
:
'break-word'
,
marginTop
:
'16px'
,
},
heading
:
{
fontFamily
:
'-apple-system, system-ui, BlinkMacSystemFont, Roboto, "Segoe UI", "Fira Sans", Avenir, "Helvetica Neue", "Lucida Grande", sans-serif'
,
fontSize
:
'20px'
,
fontWeight
:
'400'
,
lineHeight
:
'28px'
,
color
:
'#000000'
,
marginBottom
:
'0px'
,
marginTop
:
'0px'
,
},
}
packages/next/server/hot-reloader.ts
View file @
0d49f22e
...
...
@@ -488,7 +488,6 @@ export default class HotReloader {
pagesDir
:
this
.
pagesDir
,
reload
:
this
.
reload
.
bind
(
this
),
pageExtensions
:
this
.
config
.
pageExtensions
,
hotRouterUpdates
:
this
.
config
.
experimental
.
reactRefresh
!==
true
,
...(
this
.
config
.
onDemandEntries
as
{
maxInactiveAge
:
number
pagesBufferLength
:
number
...
...
packages/next/server/next-dev-server.ts
View file @
0d49f22e
...
...
@@ -28,7 +28,6 @@ import { normalizePagePath } from '../next-server/server/normalize-page-path'
import
Router
,
{
Params
,
route
}
from
'../next-server/server/router'
import
{
eventCliSession
}
from
'../telemetry/events'
import
{
Telemetry
}
from
'../telemetry/storage'
import
ErrorDebug
from
'./error-debug'
import
HotReloader
from
'./hot-reloader'
import
{
findPageFile
}
from
'./lib/find-page-file'
import
{
getNodeOptionsWithoutInspect
}
from
'./lib/utils'
...
...
@@ -49,10 +48,7 @@ export default class DevServer extends Server {
constructor
(
options
:
ServerConstructor
&
{
isNextDevCommand
?:
boolean
})
{
super
({
...
options
,
dev
:
true
})
this
.
renderOpts
.
dev
=
true
;(
this
.
renderOpts
as
any
).
ErrorDebug
=
this
.
nextConfig
.
experimental
?.
reactRefresh
===
true
?
ReactDevOverlay
:
ErrorDebug
;(
this
.
renderOpts
as
any
).
ErrorDebug
=
ReactDevOverlay
this
.
devReady
=
new
Promise
(
resolve
=>
{
this
.
setDevReady
=
resolve
})
...
...
packages/next/server/on-demand-entry-handler.ts
View file @
0d49f22e
...
...
@@ -48,7 +48,6 @@ export default function onDemandEntryHandler(
pageExtensions
,
maxInactiveAge
,
pagesBufferLength
,
hotRouterUpdates
,
}:
{
buildId
:
string
pagesDir
:
string
...
...
@@ -56,7 +55,6 @@ export default function onDemandEntryHandler(
pageExtensions
:
string
[]
maxInactiveAge
:
number
pagesBufferLength
:
number
hotRouterUpdates
:
boolean
}
)
{
const
{
compilers
}
=
multiCompiler
...
...
@@ -90,7 +88,6 @@ export default function onDemandEntryHandler(
const
pageLoaderOpts
:
ClientPagesLoaderOptions
=
{
page
,
absolutePagePath
,
hotRouterUpdates
,
}
return
addEntry
(
compilation
,
compiler
.
context
,
name
,
[
compiler
.
name
===
'client'
...
...
packages/next/taskfile.js
View file @
0d49f22e
...
...
@@ -523,22 +523,9 @@ export async function path_to_regexp(task, opts) {
.
source
(
opts
.
src
||
relative
(
__dirname
,
require
.
resolve
(
'path-to-regexp'
)))
.
target
(
'dist/compiled/path-to-regexp'
)
}
externals
[
'react-error-overlay'
]
=
'next/dist/compiled/react-error-overlay'
export
async
function
react_error_overlay
(
task
,
opts
)
{
await
task
.
source
(
opts
.
src
||
relative
(
__dirname
,
require
.
resolve
(
'react-error-overlay'
))
)
.
target
(
'dist/compiled/react-error-overlay'
)
}
export
async
function
precompile
(
task
)
{
await
task
.
parallel
([
'browser_polyfills'
,
'path_to_regexp'
,
'react_error_overlay'
,
'copy_ncced'
,
])
await
task
.
parallel
([
'browser_polyfills'
,
'path_to_regexp'
,
'copy_ncced'
])
}
// eslint-disable-next-line camelcase
...
...
test/integration/client-navigation/test/index.test.js
View file @
0d49f22e
...
...
@@ -949,7 +949,7 @@ describe('Client Navigation', () => {
})
describe
(
'runtime errors'
,
()
=>
{
it
(
'should show re
act-error-overlay
when a client side error is thrown inside a component'
,
async
()
=>
{
it
(
'should show re
dbox
when a client side error is thrown inside a component'
,
async
()
=>
{
let
browser
try
{
browser
=
await
webdriver
(
context
.
appPort
,
'/error-inside-browser-page'
)
...
...
@@ -964,7 +964,7 @@ describe('Client Navigation', () => {
}
})
it
(
'should show re
act-error-overlay
when a client side error is thrown outside a component'
,
async
()
=>
{
it
(
'should show re
dbox
when a client side error is thrown outside a component'
,
async
()
=>
{
let
browser
try
{
browser
=
await
webdriver
(
...
...
yarn.lock
View file @
0d49f22e
...
...
@@ -14118,11 +14118,6 @@ react-dom@16.12.0:
prop-types "^15.6.2"
scheduler "^0.18.0"
react-error-overlay@5.1.6:
version "5.1.6"
resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-5.1.6.tgz#0cd73407c5d141f9638ae1e0c63e7b2bf7e9929d"
integrity sha512-X1Y+0jR47ImDVr54Ab6V9eGk0Hnu7fVWGeHQSOXHf/C2pF9c6uy3gef8QUeuUiWlNb0i08InPSE5a/KJzNzw1Q==
react-is@16.13.1, react-is@^16.7.0:
version "16.13.1"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment