Skip to content
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

Improve module interface of @marp-team/marpit/plugin #341

Merged
merged 4 commits into from
Sep 10, 2022

Conversation

yhatt
Copy link
Member

@yhatt yhatt commented Sep 9, 2022

I found that usage of a plugin module through classical CJS way require('@marp-team/marpit/plugin') is not working.

This PR makes compatible @marp-team/marpit/plugin with CJS require(), ESM default export, and ESM named export. Now Marpit plugin example explained at https://marpit-api.marp.app will work correctly.

Jest will test sources directly. A root entrypoint of plugin interface
is depending on the build output so Jest may fail to test if run before
build.
@yhatt yhatt changed the title Improved module interface of @marp-team/marpit/plugin Improve module interface of @marp-team/marpit/plugin Sep 10, 2022
@yhatt yhatt merged commit 44663c9 into main Sep 10, 2022
@yhatt yhatt deleted the improved-plugin-interface branch September 10, 2022 05:25
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