Source code of my blog: Code splitting for highlight.js in markdown-it
A minimal sample to code-split when using highlight.js in markdown-it.
It's written in Vue 3, but this approach also works with React and others since it requires updating to the DOM directly.
Run
pnpm dev
Build
pnpm build
Preview the production build
pnpm preview