mirror of
https://github.com/facebook/docusaurus.git
synced 2025-08-06 10:20:09 +02:00
feat(mdx-loader): upgrade to MDX v3 + (#9451)
This commit is contained in:
parent
8d19054d91
commit
7e456ece3c
49 changed files with 37351 additions and 30469 deletions
|
@ -5,7 +5,6 @@
|
|||
* LICENSE file in the root directory of this source tree.
|
||||
*/
|
||||
|
||||
import visit from 'unist-util-visit';
|
||||
import npmToYarn from 'npm-to-yarn';
|
||||
import type {Code, Literal} from 'mdast';
|
||||
// @ts-expect-error: TODO see https://github.com/microsoft/TypeScript/issues/49721
|
||||
|
@ -173,7 +172,9 @@ function createImportNode() {
|
|||
const plugin: Plugin<[PluginOptions?]> = (options = {}): Transformer => {
|
||||
// @ts-expect-error: todo temporary
|
||||
const {sync = false, converters = ['yarn', 'pnpm']} = options;
|
||||
return (root) => {
|
||||
return async (root) => {
|
||||
const {visit} = await import('unist-util-visit');
|
||||
|
||||
let transformed = false;
|
||||
let alreadyImported = false;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue