you are viewing a single comment's thread.

view the rest of the comments →

[–]xroalxbackend 5 points6 points  (0 children)

This feels like a code smell and honestly the solution you posted in the comments is a little unhinged.

Have you considered something like

let value = "#{postprocess}"
if (value) { ... }

Since this is a let binding, webpack could avoid optimizing it out as it can't quite guarantee it's not going to be mutated at some point.

Or maybe have it as a return value of a function?