import r from"node:path";import n,{readFileSync as a}from"node:fs";const p=()=>({name:"asyncapi-patch",setup(o){o.onLoad({filter:/@asyncapi\/react-component\/lib\/esm\/components\/Markdown.js$/},async e=>{let t=await n.promises.readFile(e.path,"utf8");return t=t.replace("import { sanitize } from 'isomorphic-dompurify';","const sanitize = (html) => html;"),{contents:t,loader:"js"}}),o.onLoad({filter:/XMLHttpRequest-impl\.js$/},e=>{let t=a(e.path,"utf8");return t=t.replace(/const syncWorkerFile = .*?;/,"const syncWorkerFile = null;"),{contents:t,loader:"js",resolveDir:r.dirname(e.path)}})}});export{p as AsyncApiPatch};
