You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to migrate to this package and away from using mdx-loader (v1) with createDocsCompiler.
My repo uses a custom pragma for React so that JSX elements are compiled to h(Component, props) rather than React.createElement(Component, props). With the previous set-up this was fine as long as I used my babel loader after mds-loader.
However that is not the case with this package. The culprit seems to be the DEFAULT_RENDERER that is defined in loader.js.
I'd suggest that the loader take some new options to allow configuration of this. It should be possible to mirror mdx-loader. i.e:
options.pragma (default: React.createElement)
options.pragmaImportSource (default: react)
(Aside, does allowing the configuration of the source have any value?)
I'm trying to migrate to this package and away from using mdx-loader (v1) with
createDocsCompiler
.My repo uses a custom pragma for React so that JSX elements are compiled to
h(Component, props)
rather thanReact.createElement(Component, props)
. With the previous set-up this was fine as long as I used my babel loader after mds-loader.However that is not the case with this package. The culprit seems to be the
DEFAULT_RENDERER
that is defined inloader.js
.I'd suggest that the loader take some new options to allow configuration of this. It should be possible to mirror mdx-loader. i.e:
options.pragma
(default:React.createElement
)options.pragmaImportSource
(default:react
)(Aside, does allowing the configuration of the source have any value?)
See: https://mdxjs.com/packages/mdx/#optionspragma
The text was updated successfully, but these errors were encountered: