To use Plotly.js with React.js you must use a wrapper like react-plotly.js. Plotly.js package has an unpacked size of 79.8 MB according to its official npm page. In my project, I don't need to use all of the package.
In the official GitHub repository is possible to find many bundle files, each containing a specific kind of plot available in Ploty.js. My example of usage in a simple React.
When I use the same approach in my project, that uses Next.js and Typescript, I got this error:
Server Error
ReferenceError: self is not defined
This error happened while generating the page. Any console logs will be displayed in the terminal window.
That is any way to use those bundles/distributed files with Next.js?