marp-team / marpit

The skinny framework for creating slide deck from Markdown
https://marpit.marp.app/
MIT License
964 stars 46 forks source link

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

Closed yhatt closed 2 years ago

yhatt commented 2 years ago

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.