Proposing this, not sure of how hard it will be, but cheerio is designed for the server and comes with a ton of node core dependencies it wants. It was causing me some headaches in terms of build size (Buffer and other files coming in are huge).
Separately, recently tried to use webpackbin to show some code on Slate, and it failed. See this issue: https://github.com/cerebral/webpackbin/issues/17#issuecomment-298134310
For a browser-focused lib, seems we could do better.
Ah that is annoying. Any ideas for a Cheerio replacement that offers a simple API?
This will also be solved (depending on your use case) with https://github.com/ianstormtaylor/slate/issues/55
Yea, removing it as an option seems like a good first step. We don't use it in our stack at all so that would fix our use case.
On first look, parse5 seems legit, and doesn't seem to have any deps:
Ok, since cheerio is breaking my favorite js bundler, and my favorite online code sharing env, going to try and submit a PR for this :)
I'd be open to using a DOMParser-compatible API, so that in the browser we can just use DOMParser directly, and on the server we can use something that implements DOMParser's API, like parse5?
Most helpful comment
I'd be open to using a
DOMParser-compatible API, so that in the browser we can just useDOMParserdirectly, and on the server we can use something that implementsDOMParser's API, likeparse5?