Cannot read properties of undefined (reading 'bits')
I'm trying to use PdfMake in my NextJS project. Everything works fine in development but it's not working in the production build.
Here is a screenshot of the error I'm getting

I've created a repository with a simple project and all the instructions to reproduce the error.
Disable swcMinify in the next Config file and everything will work!

For future searchers: in Firefox, the error is TypeError: t[e] is undefined. I didn't find my way to this issue until I tried looking for the Chrome version of the error, which is already listed above.
Was this ever resolved? I keep getting warnings that disabling SWC Minifer will not be an option in the next major version.
I’m using next 14 without disabling swc and it seems to be working
Interesting, thanks. I'll report back once I've tried the same (since I'm in the process of upgrading to next 14 myself).