Skip to content

feat: add a markdown-exit/core entry without linkify-it - #41

Merged
serkodev merged 4 commits into
serkodev:mainfrom
onmax:feat/core-entry
Nov 3, 2026
Merged

serkodev merged 4 commits into
serkodev:mainfrom
onmax:feat/core-entry

Conversation

@onmax

@onmax onmax commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

resolves #39

because Parser runs new LinkifyIt() for every instance, linkify-it is in every bundle, even for apps that never enable linkify.

this adds a markdown-exit/core entry that never imports linkify-it. the default entry registers it, so markdown-exit behaves exactly as before, and md.linkify stays a plain eager field. in markdown-exit/core, md.linkify is unset until you assign one, and enabling linkify without it throws an error that says so. a test bundles both entries with vite and checks that only the default one imports linkify-it.

bundle KiB minified / gzip
markdown-exit 108.4 / 46.8
markdown-exit/core 99.3 / 43.3

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.

linkify-it is bundled even with linkify: false

2 participants