A Markdown-it plugin that allows you to ignore JavaScript import statements in MDX files.
npm install markdown-it-ignore-imports
// ESM
import MarkdownIt from "markdown-it";
import ignoreImportsPlugin from "markdown-it-ignore-imports";
const md = new MarkdownIt().use(ignoreImportsPlugin);
// CommonJS
const MarkdownIt = require("markdown-it");
const ignoreImportsPlugin = require("markdown-it-ignore-imports");
const md = new MarkdownIt().use(ignoreImportsPlugin);
# Example Markdown
Some introductory text.
import SomeModule from 'some-module';
More text here.
import AnotherModule from 'another-module';
<h1>Example Markdown</h1>
<p>Some introductory text.</p>
<p>More text here.</p>