Hi, I am getting while using the mjml-core library, I am using webpack to build my system. This error comes after building the project, and I am using the bundled code inside another .js file.
var $ = cheerio.load('', { decodeEntities: false });
^
TypeError: cheerio.load is not a function
in bundle.js __webpack_require_ returns {} for cheerio.
I'm assuming that you already have a prior line in your code like:
let cheerio = require('cheerio');
If so, you are going to need to dig through what changes all that bundling did to the original files.
This appears to be a problem with your build configuration. If you are able to provide a file (or set of files) that demonstrates this problem, we may be able to help, but it seems unlikely that Cheerio itself is the source of the problem.