Skip to content

React 17: pragma and pragmaFrag cannot be set when runtime is automatic #1345

Answered by ChristianMurphy
michrome asked this question in Q&A
Discussion options

You must be logged in to vote

V1 got a fix for this #1307
it looks like it hasn't been applied to v2 yet

mdx/packages/mdx/index.js

Lines 95 to 109 in e194fc1

return `/* @jsx mdx */
${contents}`
}
async function compile(mdx, options = {}) {
const compiler = createCompiler(options)
const fileOpts = {contents: mdx}
if (options.filepath) {
fileOpts.path = options.filepath
}
const {contents} = await compiler.process(fileOpts)
return `/* @jsx mdx */

A PR porting the change to v2 would be welcome!

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@michrome
Comment options

Answer selected by michrome
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants