-
Notifications
You must be signed in to change notification settings - Fork 141
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include CommonJS exports in addition to ESM so this library can be used in a next.js custom server #443
Comments
@MorganDavid Thanks for reporting this! I'm reasonably confident this isn't something we're going to implement as we've already taken the plunge to be an ESM only package (and have been so for over two years). That being said I'd be happy to take a look at a minimal reproduction of the issue if you're down to make one; the linked issue does not have a clear reproduction, and is using Next.js v12, which is practically ancient at this point. |
@MorganDavid did you try the |
NodeNext workaround does not work for me |
@bcigdemoglu probably need more context (any error messages, what exactly you've tried, reproduction repo, what your guess is of the problem) if you're looking for some help from others here :) |
there was another ticket |
Next.js Custom servers don't support ESM exports in third party libraries (vercel/next.js#36940)
Since next-mdx-remote doesn't have commonjs exports, it's difficult to get this library to work in projects that use a custom server.
vercel/next.js#36940
Trying to use this library in the custom server, results in this error:
I realise this is probably a next.js problem... but thought I'd leave this here in case anybody runs into this problem.
The text was updated successfully, but these errors were encountered: