pi0/nuxt-shiki

Function-type arguments passed into module options will be erased

KazariEX opened this issue · 2 comments

Since JSON.stringify() does not allow the inclusion of function types, it renders any transformers used with it ineffective.

// module.ts
export const shikiOptions = {
  highlight: ${JSON.stringify(highlightOptions, null, 2)},
  // ...
};

I think a util can be provided to inject global transformers into highlightOptions at runtime.