Open arnaudambro opened 2 months ago
There's a Remix section on the start page of the docs that points to a working sample repository. Let me know how can I make this easier to discover - what did you try and how did you miss this?
You're right, I think all the versions are mixed up in my project
I updated your working repo with the latest versions for all, I'm gonna make a PR... when git is fixed 🥲
the problem is when adding some plugins, look at this PR https://github.com/arnaudambro/mdx-editor-in-remix/pull/2
Error [ERR_REQUIRE_ESM]: require() of ES Module /mdx-editor-in-remix/node_modules/@mdxeditor/editor/dist/index.js from /mdx-editor-in-remix/build/index.js not supported.
Instead change the require of /mdx-editor-in-remix/node_modules/@mdxeditor/editor/dist/index.js in /mdx-editor-in-remix/build/index.js to a dynamic import() which is available in all CommonJS modules.
If you want to ask for support or request features, sponsor the project and contact me over email.
Describe the bug It's not a bug, but a really PITA for installation with Remix, related to CJS / ESM
I started from indie stack: https://github.com/remix-run/indie-stack
here is the important files I think: package.json I needed to install manually
parse-entities
andlexical
tsconfig.json just here to let you know vite.config.ts the pita here was to add thisremix.config.js same as the
vite.config.ts
but forserverDependenciesToBundle
fieldMDXCustomEditor.tsx I added all the possible extensions there, inspired from your Live demo https://github.com/mdx-editor/editor/blob/main/src/examples/site-demo.tsx
finally I used it this way,
I just want to open the issue here to
once it's installed, it's a fabulous job you did there! much better and easier than draft.js or slate
thanks !