Nextjs next.config/webpack error with wasm/js
I’m using some external code in my application to compile latex. I’ve downloaded the code from this repo: https://github.com/SwiftLaTeX/SwiftLaTeX however when I use this code in my own application I get this error: ‘SyntaxError: Cannot use ‘import.meta’ outside a module (at swiftlatexdvipdfm.a31b1cfc.js:3587:24)’. This is my next.config.js right now, I’ve tried to change it a couple of times, using varying webpack configurations, however this has not fixed the issue so right now my next.config.js is looking like this: