ReferenceError: exports is not defined in Next.JS with Dynamic Script Loading
I’m working on a Next.js React application where I need to dynamically load and use a JavaScript file hosted on an external server (which I’m unable to modify). The script contains a React component that I need to integrate into my application.