wooorm / xdm

Just a *really* good MDX compiler. No runtime. With esbuild, Rollup, and webpack plugins
http://wooorm.com/xdm/
MIT License
595 stars 18 forks source link

No `main` field in `package.json` leads to Next issue #49

Closed tristandubbeld closed 3 years ago

tristandubbeld commented 3 years ago

Hi there! I'm using mdx-bundler in a next.js project and wanted to try Node version 16. When running yarn dev I get the following warning:

(node:6755) [DEP0151] DeprecationWarning: No "main" or "exports" field defined in the package.json for /node_modules/xdm/ resolving the main entry point "index.js", imported from /node_modules/mdx-bundler/dist/index.js.
Default "index" lookups for the main are deprecated for ES modules.
(Use `node --trace-deprecation ...` to show where the warning was created)

It seems that in version 16 either main or exports is required in the package.json. This issue is not breaking anything (it defaults to the right file) but it does clog up the console a little bit.