perf(parser): lazy import default plugins by OrbisK · Pull Request #503 · comarkdown/comark · GitHub
Skip to content

perf(parser): lazy import default plugins - #503

Draft
OrbisK wants to merge 2 commits into
comarkdown:mainfrom
OrbisK:perf/lazy-import-default-plugins
Draft

OrbisK wants to merge 2 commits into
comarkdown:mainfrom
OrbisK:perf/lazy-import-default-plugins

Conversation

@OrbisK

@OrbisK OrbisK commented Oct 19, 2026

Copy link
Copy Markdown

Draft, because I am still playing around with it.

What

While evaluating comark for my small web extension, I spotted that the bundle always includes the default plugins, even with registerDefaultPlugins: false.

I started experimenting with lazy loading the plugins to reduce bundle size for usage without default plugins.

Why

First measurements:

Before After Diff
Default plugins off 224.8 kB (92.4 kB gzip) 152.6 kB (69.3 kB gzip) −72.2 kB (−32%)
Default plugins on 224.8 kB (92.4 kB gzip) 227.4 kB (152.6 kB + 74.8 kB loaded on first use) +2.6 kB

@coderabbitai

coderabbitai Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@vercel

vercel Bot commented Oct 19, 2026

Copy link
Copy Markdown

This branch has not been deployed

No deployments
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

Successfully merging this pull request may close these issues.

1 participant