kentcdodds / mdx-bundler

🦤 Give me MDX/TSX strings and I'll give you back a component you can render. Supports imports!
MIT License
1.78k stars 75 forks source link

Error: Dynamic require of "fs" is not supported with Remix new dev server #214

Open kwiat1990 opened 1 year ago

kwiat1990 commented 1 year ago

I have followed Remix docs to change to ESM while using custom express server and after that I encounter an issue with the MDX Bundler:

node_modules/mdx-bundler/dist/index.js:8
var _fs = _interopRequireDefault(require("fs"));
                                 ^
Error: Dynamic require of "fs" is not supported

I have also put MDX Bundler packages in the serverDependenciesToBundle of remix.config.js.

Can I get MDX Bundler working with Remix's new dev server or is it a deal breaker?