Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add console output when minifying fails #648

Merged
merged 4 commits into from
Mar 11, 2021
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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('Error happens when minifying. The result will not be minified.')
styfle marked this conversation as resolved.
Show resolved Hide resolved
}
}

if (v8cache) {
Expand Down