Skip to content

Commit

Permalink
chore: add console output when minifying fails (#648)
Browse files Browse the repository at this point in the history
* chore: add console output when minifying fails

* chore(style): tabs to spaces

* Update error message

Co-authored-by: Steven <steven@ceriously.com>
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
  • Loading branch information
3 people committed Mar 11, 2021
1 parent 1bd2aac commit bccd662
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -410,11 +410,14 @@ function ncc (
});
// For some reason, auth0 returns "undefined"!
// custom terser phase used over Webpack integration for this reason
if (result.code !== undefined)
if (result.code !== undefined) {
({ code, map } = {
code: result.code,
map: sourceMap ? JSON.parse(result.map) : undefined
});
} else {
console.log('An error occurred while minifying. The result will not be minified.')
}
}

if (v8cache) {
Expand Down

0 comments on commit bccd662

Please sign in to comment.