You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Parser from markdown-exit/core still bundles the renderer and presets #42
A markdown-exit/parser entry that exports Parser without the renderer and presets.
Motivation
import { Parser } from 'markdown-exit/core' also bundles the renderer and presets, because tsdown emits core as one chunk. Comark only calls md.parse(), so it ships code it never runs.
Before is import { Parser } from 'markdown-exit/core', after is the same import from markdown-exit/parser.
before
after
change
minified
98.2 KiB
89.9 KiB
-8.3 KiB
gzip
33.91 KiB
31.25 KiB
-2.66 KiB
Proposed Solution
Add src/index.parser.ts, which re-exports ./parser and ./token, as a tsdown entry and a ./parser export. Its tokens match MarkdownExit().parse() on all 2,597 fixture blocks. Setting "sideEffects": ["./dist/index.js"] would shrink the core import to 31.3 KiB as well, but I haven't checked every module for side effects.
Yes, I think #49 solves it. I closed #46, and I don't think this issue needs to stay open because with #49 importing only Parser from markdown-exit/core already drops the renderer and presets, so a separate entry is not needed anymore
Activity
serkodev commentedon Nov 16, 2026
Do you think #49 can solve this problem?
onmax commentedon Nov 16, 2026
Yes, I think #49 solves it. I closed #46, and I don't think this issue needs to stay open because with #49 importing only
Parserfrommarkdown-exit/corealready drops the renderer and presets, so a separate entry is not needed anymore