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
feat!: mdc.config.js
support, improve shiki bundle
#129
Conversation
mdc.config.js
supportmdc.config.js
support, improve shiki bundle
This PR is ready to review. Also did a test on nuxt.com with: nuxt/nuxt.com#1486 |
From what I understand now, we switched to use WASM by default. This breaks module's usability in some use-cases. We need to consider a couple of usages:
|
For WASM, Shiki/Shikiji always needs WASM, and the do works in the browser. This PR does not change that.
Can you give a more concrete example of what the usages be like? I am happy to expose the necessary options to make them decoupled. |
Co-authored-by: Farnabaz <farnabaz@gmail.com>
Co-authored-by: Farnabaz <farnabaz@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
Resolves #124
Changes
mdc.config.ts/js
file, imported via#mdc-configs
highlighter: 'custom'
, it allows users to provide a highlighter function (instead of filepath) to have custom highlight. In that case, Shiki won't be included in the bundle at all.highlighter.langs
statically (it's a breaking change).highlighter.preload
is deprecated..output
dist of the/playground
comparison:main
branch: 22MB (4.5MB zipped)Refactor
/templates
folder.TODOs