generated from md2docx/md2docx-plugin-template-archived
-
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Currently, when using plugins in mdast2docx, we must pass the entire docx module (import * as docx from "docx") to plugin functions.
🔗 Related Discussion: [#6](md2docx/mdast2docx#6)
🔗 Blocking Issue in docx Library: [dolanmiu/docx#2988](dolanmiu/docx#2988)
Problem:
- This approach increases bundle size unnecessarily.
- Ideally, each plugin should import only the
docxcomponents it needs. - However, due to how
docxhandles exports, this is not currently possible.
Proposed Solution (Dependent on docx Fix):
- Once [dolanmiu/docx#2988](Using different docx based libraries do not function well together. dolanmiu/docx#2988) is resolved, update the plugin API:
- Modify the function signatures so plugins do not require the full
docxmodule. - Allow plugins to import only the necessary parts of
docx.
- Modify the function signatures so plugins do not require the full
📌 Next Steps:
- Monitor the upstream issue in
docx. - If a workaround is available, implement it before the official fix.
- Refactor
mdast2docxplugins accordingly once the issue is resolved.
Metadata
Metadata
Assignees
Labels
No labels