When attempting to use '@amcharts/amcharts4/core' package and other amchart modules within a NextJS project I was getting an error:
SyntaxError: Unexpected token 'export'
After reading lots of posts and info about it I found this issue very helpful which allowed me to find the solution which is dynamic imports, I will share the solution below of how I solved it.