You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Aug 4, 2021. It is now read-only.
On this line, I'm getting null back for flatten and then the plugin crashes. Maybe it needs a check? Or is flatten misbehaving? With a bit of logging, I could see that quite a few function calls were actually resulting in a null.
I think I may be using the plugin wrong though. I'm trying to combine it with Babel and Node module resolution and I'm unsure where to insert it in the plugin chain. I'm guessing it should just work anywhere because it inspects function calls in the AST and should therefore be compatible with any tree structure?
My actual goal is to remove statements that match either logger.*() or this._logger.*() in a production build. Can that be achieved? Especially the latter is probably going to be problematic because of the this?
Thanks!
The text was updated successfully, but these errors were encountered:
Thanks! Should be fixed in 1.1.0 (it was expecting the top-most object of any member expression to be an identifier – things like this look different as far as an AST is concerned. Have added support for this and super, which are the only relevant identifier-like keywords that immediately occur to me)
Thanks! In the meantime, I've been cooking up my own plugin tailored to what I was trying to achieve. I just open sourced it. I'll probably mess with it some more before I publish it, but I thought it might inspire you.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
On this line, I'm getting
null
back forflatten
and then the plugin crashes. Maybe it needs a check? Or isflatten
misbehaving? With a bit of logging, I could see that quite a few function calls were actually resulting in anull
.I think I may be using the plugin wrong though. I'm trying to combine it with Babel and Node module resolution and I'm unsure where to insert it in the plugin chain. I'm guessing it should just work anywhere because it inspects function calls in the AST and should therefore be compatible with any tree structure?
My actual goal is to remove statements that match either
logger.*()
orthis._logger.*()
in a production build. Can that be achieved? Especially the latter is probably going to be problematic because of thethis
?Thanks!
The text was updated successfully, but these errors were encountered: