-
Notifications
You must be signed in to change notification settings - Fork 435
Description
Describe the problem
Like many OSS projects, Preact uses Docsearch on our site to support search functionality. Whilst the bundle sizes have historically been a bit larger than we'd like, and there's been some problems with bundling, but generally we've been pretty happy with it.
So when I went to take a look at the new version a few weeks ago I was rather astounded at the bundle size as it's more than quadrupled in just a handful of minors & a major. It went from 26kb in 3.6.0 to 114kb in 4.0.1 which is rather horrific. Some recent PRs have also bumped the bundle size warnings 30%+ at a time which is quite a big jump.
So I'd like to ask ask, is this just the new direction of the lib? Is bundle size not one of the core concerns anymore? We're sorta boxed in from the consumer side as Docsearch was already 50% of the total site JS (at least, outside of our REPL which is much heavier) and we built a custom lazy loading solution to accomodate it. Quadrupling size though, I don't think there's any way we can make that work. We have many users on poor internet connections and older devices and ~100kb of JS just for searching is a big ask.
I'm hoping this is just a temporary thing whilst perhaps you're dealing with bundler woes & complications (I think every front end dev has been there, we get it). From a quick skim it looks like we're always stuck with some AI stuff, which we have no desire to ever use, and it looks like marked is being inlined too? Not totally sure on that. Obviously we're OSS consumers on donated time and resources so it's 100% cool whatever you do, I'd never make demands, but there seems to be a 180 in development priorities which, at least right now, feels like it's leaving smaller/slimmer sites behind.