Closed ouuan closed 1 year ago
CI is running/has finished running commands for commit 8ef38364e126346ef94c6c0d3952c63e2e5c3450. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.
📂 See all runs for this branch
Sent with 💌 from NxCloud.
Thanks for the fix! 😃
wondering why not use a remark plugin instead of the Vite plugin
In this case we are not modifying markdown documents, instead we inject it in the global registry used by MDX for shortcodes.
Background 📜
The id looks like
composables/mdxComponents.js?v=a217f6bd
since around Vite v3.1.This caused all images to be corrupted in dev mode.
The Fix 🔨
Use
includes
instead ofendsWith
to check theid
.But I'm wondering why not use a remark plugin instead of the Vite plugin 🤔 (I haven't tried writing a remark plugin for
<Picture>
yet, maybe it simply doesn't work for some reason.)