I am using MDX with React's new JSX Transform. My babel configuration is following:
const plugins = [
['@babel/plugin-proposal-nullish-coalescing-operator'],
['@babel/plugin-proposal-optional-chaining'],
['@babel/plugin-transform-react-jsx', {
runtime: 'automatic',
importSource: 'react'
}]
];
However when bundling and transpiling MDX files via Webpack using @mdx-js/loader, I get following error:
importSource cannot be set when runtime is classic.
It looks like it is not picking runtime as automatic from the Babel configuration. How can I tell the loader to pick import source as mentioned in the babel config file.