I checked a few examples from the Next.js repository
and noticed that examples use ES Modules in React components and CommonJS modules in the server.js file.
I'd like to keep my code written in one style, is it possible to use only ES Modules in a Next.js project?
This is sitting as a feature request in the Next.js backlog. https://github.com/zeit/next.js/issues/9607
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With