From: Cristian Pallarés Date: Thu, 18 Feb 2021 17:04:31 +0000 (+0100) Subject: refactor: use console.error during lazy loading (#777) X-Git-Tag: v4.0.4~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=81c141275d1a9a7aca7f825189c764b6dd353725;p=thirdparty%2Fvuejs%2Frouter.git refactor: use console.error during lazy loading (#777) By using `console.error` even in the development environment, we will provide useful information such as the reference to the actual ES module that failed and the code line where it happened --- diff --git a/src/navigationGuards.ts b/src/navigationGuards.ts index c7a872d1..185a22f2 100644 --- a/src/navigationGuards.ts +++ b/src/navigationGuards.ts @@ -298,9 +298,7 @@ export function extractComponentsGuards( componentPromise = Promise.resolve(componentPromise as RouteComponent) } else { // display the error if any - componentPromise = componentPromise.catch( - __DEV__ ? err => err && warn(err) : console.error - ) + componentPromise = componentPromise.catch(console.error) } guards.push(() =>