If I'm understanding everything correctly, some transform that psc-bundle does eliminates a needed variable declaration. Minimum reproduction and some notes at the repo below:
https://github.com/codygman/purescript-optimize-issue
I also created an issue in purescript-contrib/pulp#227 since turning on optimization with pulp browserify ends up being affected by this runtime error bug due to a necessary var declaration being optimized away.
If I'm understanding everything correctly, some transform that psc-bundle does eliminates a needed variable declaration. Minimum reproduction and some notes at the repo below:
https://github.com/codygman/purescript-optimize-issue
I also created an issue in purescript-contrib/pulp#227 since turning on optimization with pulp browserify ends up being affected by this runtime error bug due to a necessary var declaration being optimized away.