markdown-to-jsx icon indicating copy to clipboard operation
markdown-to-jsx copied to clipboard

different entry file that doesn't import react?

Open Haroenv opened this issue 3 months ago • 3 comments

Hi, since #711 react is passed as an optional peer dependency, but now in another example using parcel I'm seeing that it still tries to import react if that's not installed:

@parcel/core: Failed to resolve 'react' from './node_modules/markdown-to-jsx/dist/index.modern.js'

  /project/workspace/node_modules/markdown-to-jsx/dist/index.modern.js:15:14

I didn't notice before as our main monorepo does have react installed.

Could there maybe be a different entry point that doesn't import react in the final file. For my personal use case only the compile function is needed, not the Markdown function, so something like a /standalone could work that doesn't depend on react.

Otherwise of course there's still the option of forking, but that's annoying as this seems a package that gets frequent updates.

Thanks!

Haroenv avatar Oct 15 '25 12:10 Haroenv

This will be available in v9

quantizor avatar Nov 17 '25 05:11 quantizor

Pushed to v10, I want people to see the deprecation message for a bit

quantizor avatar Nov 22 '25 07:11 quantizor

I've got an additional question, but if I still want to produce JSX based on the createElement that I'm passing (the one from preact), I still should import the react version for now right?

Haroenv avatar Nov 26 '25 10:11 Haroenv