👋 Hello from Recharts!
We have this problem where Recharts fails to build using next.js standalone.
The situation is:
The cause seems to be that the Recharts code is referencing redux/toolkit ESM bundle but those files are not included in the standalone build. Copying the appropriate files to the standalone folder fixes it.
Also adding exports to Recharts package.json would fix this - but it breaks so many other places that we can't do that just yet.
Here's a summary with more details: recharts/recharts#6117 (comment)
Here's a reproduction: recharts/recharts-integ#88
Do you have any recommendation what can we do to have everything compile in nextjs? Thanks!
👋 Hello from Recharts!
We have this problem where Recharts fails to build using next.js standalone.
The situation is:
next devbut fails to run when usingnext build && node .next/standalone/server.jsThe cause seems to be that the Recharts code is referencing redux/toolkit ESM bundle but those files are not included in the standalone build. Copying the appropriate files to the standalone folder fixes it.
Also adding
exportsto Recharts package.json would fix this - but it breaks so many other places that we can't do that just yet.Here's a summary with more details: recharts/recharts#6117 (comment)
Here's a reproduction: recharts/recharts-integ#88
Do you have any recommendation what can we do to have everything compile in nextjs? Thanks!