MathJax’s Loader Option with TypeScript

I try to integrate xyjax-v3 into my VitePress project , but I failed . VitePress use markdown-it-mathjax to render math equations . It supports all extensions listed here except xyjax-v3 .

To make it possible to support xyjax-v3 , I git clone the entire markdown-it-mathjax . Here is part of the index.ts :

...
import { mathjax } from "mathjax-full/js/mathjax.js";
import { TeX } from "mathjax-full/js/input/tex.js";
import { SVG } from "mathjax-full/js/output/svg.js";
import { liteAdaptor } from "mathjax-full/js/adaptors/liteAdaptor.js";
import { RegisterHTMLHandler } from "mathjax-full/js/handlers/html.js";
import { AllPackages } from "mathjax-full/js/input/tex/AllPackages.js";
import { AssistiveMmlHandler } from "mathjax-full/js/a11y/assistive-mml.js";
...

interface DocumentOptions {
  InputJax: TeX<unknown, unknown, unknown>;
  OutputJax: SVG<unknown, unknown, unknown>;
}

...

Notice that it uses MathJax’s document options , which has 5 developer options . In our case it uses InputTeX and OutputTeX ; but where should I put the following things , according to the readme.md of XyJax-v3 ?

loader: {
  load: ['[custom]/xypic.js'],
  paths: {
    custom: 'https://cdn.jsdelivr.net/gh/sonoisa/[email protected]/build/',
  },
},
tex: {
  packages: { '[+]': ['xypic'] },
},