From bb2b66e63bb2db04b4151ff3b88aa8e94672b266 Mon Sep 17 00:00:00 2001 From: evilebottnawi Date: Thu, 31 May 2018 22:27:03 +0300 Subject: [PATCH] fix: return missing important information --- src/index.js | 2 +- test/__snapshots__/all-options.test.js.snap | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/index.js b/src/index.js index a604dc19..8636c057 100644 --- a/src/index.js +++ b/src/index.js @@ -106,7 +106,7 @@ class UglifyJsPlugin { } } - return warningMessage; + return `UglifyJs Plugin: ${warningMessage} in ${file}`; } apply(compiler) { diff --git a/test/__snapshots__/all-options.test.js.snap b/test/__snapshots__/all-options.test.js.snap index b5c2c576..e10ef8e2 100644 --- a/test/__snapshots__/all-options.test.js.snap +++ b/test/__snapshots__/all-options.test.js.snap @@ -57,6 +57,6 @@ exports[`when applied with all options matches snapshot: manifest.d6857f782c13a9 exports[`when applied with all options matches snapshot: warnings 1`] = ` Array [ - "Dropping unused variable a [./test/fixtures/entry.js:4,0]", + "UglifyJs Plugin: Dropping unused variable a [./test/fixtures/entry.js:4,0] in main.0c220ec66316af2c1b24.js", ] `;