diff --git a/src/index.js b/src/index.js index 098dcc27..bd095a88 100644 --- a/src/index.js +++ b/src/index.js @@ -101,7 +101,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", ] `;