Commit 78783477 authored by chuck's avatar chuck Committed by Tim Neutkens

More Specific Info on Script Loading Error (#7108)

* add url info on script loading error message

* Update packages/next/client/page-loader.js

shorten error message for smaller bundle size
Co-Authored-By: 's avatarchuck0523 <chuckinthestar@gmail.com>
parent 4d8a9fd8
......@@ -118,7 +118,7 @@ export default class PageLoader {
script.crossOrigin = process.crossOrigin
script.src = url
script.onerror = () => {
const error = new Error(`Error when loading route: ${route}`)
const error = new Error(`Error loading script ${url}`)
error.code = 'PAGE_LOAD_ERROR'
this.pageRegisterEvents.emit(route, { error })
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment