schwarzdavid / bootstrap-email

MIT License
27 stars 11 forks source link

cheerio is not a function #13

Closed arlopezg closed 3 years ago

arlopezg commented 3 years ago

Due to the latest changes in Cheerio - at least the version used in bootstrap-email@1.1.1 - we're having troubles when compiling single/multiple templates.

Environment

Expected behavior

new BootstrapEmail("foobar.html").compile()
// should return a compiled template string

Current behavior

new BootstrapEmail("foobar.html").compile()
// cheerio is not a function

The fix should be quite trivial, i.e. calling .default when requiring cheerio.

Related PRs

This has been addressed twice in the following PRs: