How to log class/method/function name in Webpack code minification conditions?

Viewed 61

It's not always obvious from stack trace where error occurred. So, maybe it's not meaningless to log where error has been thrown.

throw new Error(ErrorsMessagesBuilder.buildErrorMessage({
  errorType: ErrorsMessagesBuilder.ErrorsTypes.invalidParameterValue,
  functionInvocationExpression: function.name,
  description: `Tasks set: '${targetTagsSetID}' is not defined in config file.`
}));

Unfortunately, function.name will be lost because of Webpack code minification. Does Webpack suggest some solutions for it?

0 Answers
Related