Closed nashbridges closed 5 months ago
Thanks @nashbridges. In another project of mine I also use terser together with antlr4ng and have no problems like that.
Yes. I think, this an unfortunate combination of antlr4 plus all the libraries we had so far plus the project setup, but alas I can't share it. Feel free to close it.
We found that after importing antlr4ng into our project the resulting bundle becomes invalid. The error is quite cryptic
We use redux toolkit (and therefore - immerjs) on the project, but the stacktrace somehow points to
which is the ParseTreeWalker.
To fix it we had to disable "compress -> unused" option from Terser.
So clearly there's something special about the library it confuses the Terser. We tried to produce it on a clean repo, but with no luck.
I do believe this is a Terser bug, so nothing to do here. Perhaps the report would be helpful for someone with the same problem.