Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function-type arguments passed into module options will be erased #36

Open
KazariEX opened this issue Apr 22, 2024 · 2 comments
Open

Function-type arguments passed into module options will be erased #36

KazariEX opened this issue Apr 22, 2024 · 2 comments

Comments

@KazariEX
Copy link

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)},
  // ...
};
@KazariEX
Copy link
Author

unjs/knitwork#61

@KazariEX
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant