-
Notifications
You must be signed in to change notification settings - Fork 2
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
Error thrown by Terser is not handled #17
Comments
Thanks! Yes a patch would be welcome, but unfortunately I cannot guarantee when I may have a chance to understand and review it. And adding a test case would be especially helpful. I think this plugin was made to work with the original rollup-plugin-terser, looks like newer |
Possibly related: TrySound#61 Most important for me would be a simple reproduction that we can keep in a test case. |
Thanks for getting back so promptly @brodybits and apologies for the delay in response! Really appreciate you updating with a way to know if Terser is failing, since it on our path to fixing build errors we are seeing in our projects. I talked to my team and we have time and I am happy to write a test case once we sort out a way of replicating. We are still looking into the reason it is failing, but you can see the failure here. |
zendeskgarden/react-containers#493 ... namely this commit: zendeskgarden/react-containers@1cbd6f6 I will try this myself as well. |
@brodybits Thank you! It looks like optional chaining was the culprit behind the failure (here), and it does seem to be supported in v5.2.0 of Terser. Upgrading would probably be the best option here - if you don't oppose, I'll raise a PR with the version upgrade accompanied by tests. |
Thanks for PR #20, reviewing it now. I discovered there could also be issues if the source has only comments or blank lines, see #21. I think this will need me to drop Node.js pre-14 support, see #18, will try to do this soon. I am thinking that the issue with error handling could continue intermittently with the lag time between new ES features coming and terser updates, may have to keep #19 open for a while. |
Hi there, we've encountered a problem when the minified source does not output
code
. Found on this line here, the error from terserv4.8.0
is not handled, but rather we see an error where the length of the minified code has no length (found here).Wondering if the solution below would be welcomed to throw this error (pseudo-code):
Happy to open up a pull request to patch.
The text was updated successfully, but these errors were encountered: