Next.js Discord

Discord Forum

Event handler disappears in production build

Unanswered
Mini Rex posted this in #help-forum
Open in Discord
Avatar
Mini RexOP
I'm using tldraw/core and setting an onZoom prop on the renderer.
That doesn't matter very much but it results in there being an onWheel event listener on my canvas. Everything is fine and dandy but after I bundle the app, this handler is somehow "optimised away".
What could this be? I'm having a hard time coming up with something else than this being a bug in whatever next uses to do dead code elimination or something.

Any hints?

3 Replies

Avatar
Mini RexOP
Production
Image
Local:
Image
Avatar
Mini RexOP
Okay, this is a bug in NextJS: https://github.com/vercel/next.js/issues/53429