From 6188193ba63ae8b77f0bcfe4a6c9e1dfdf0f6bbd Mon Sep 17 00:00:00 2001 From: Harrison Ifeanyichukwu Date: Fri, 19 Jun 2020 16:03:15 +0200 Subject: [PATCH] fix: show source file on error --- src/modules/Bundler.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/modules/Bundler.ts b/src/modules/Bundler.ts index fcb52a1..a087b7e 100644 --- a/src/modules/Bundler.ts +++ b/src/modules/Bundler.ts @@ -284,10 +284,10 @@ class Bundler { ? config.externals : allExternal; - const onWarn = (warning, warn) => { - console.log(warning.message); - warn(warning); - }; + // const onWarn = (warning, warn) => { + // console.log(warning.message); + // warn(warning); + // }; const onError = (ex) => { console.error(ex?.message || ex); @@ -300,7 +300,7 @@ class Bundler { input: filePath, plugins, external, - onwarn: onWarn, + onwarn: (warning, warn) => console.log(warning.message, filePath), }) .then((bundler) => bundler.write({