Open Marcinthedev opened 3 years ago
Hi @Marcinthedev, can you clarify what you mean by the conditional properties here, do you have an exact code example or pointer to which part of the processing you believe is blowing up in your case?
Just as I mentioned in the code. I have objects that their properties are set or not depending on whether value is falsy or not. If I use it in lots of places in the code then during the build I have memory leak.
const someObject = {
...(prop1 && {prop1}),
...etc.
}
We are using ncc for a big project amd while migrating to typescript error with memory leak occured during project building with ncc. That might be related to settings (maybe?) of ncc, but while returning conditional properties - memory leak is popping up. Example: Let's say we return object with many conditional properties:
Then during building it crashes at actually nothing helps. Have anyone had similar issue? The "walkaround" solution for it is to create a function which omits all of the empty/falsy properties and then it works normally.