This repository has been archived by the owner on May 15, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(nextjs): building nextjs app by dynamic importing nivo chart
## problem - the nextjs app was unable to build because `@nivo/core` was using a file that used commonJS format where nextjs used ESmodule - this caused the build to fail - probably cause after upgrading `@nivo/core` to v0.83.0 ## solution - lazy load nivo chart component - solution obtained from - https://nextjs.org/docs/messages/import-esm-externals#possible-ways-to-fix-it - plouc/nivo#2310 (comment) ## why - this will solve the issue of building nextjs app ## where - ./src/components/Charts/ForwardDestinations.tsx - ./src/components/Charts/QueryTypes.tsx ## usage
- Loading branch information