Open Haroenv opened 4 months ago
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit 9f92e8c3b7fd59e23e3336ba0ffb109bad9a72f1:
Sandbox | Source |
---|---|
example-instantsearch-getting-started | Configuration |
example-react-instantsearch-getting-started | Configuration |
example-react-instantsearch-next-app-dir-example | Configuration |
example-react-instantsearch-next-routing-example | Configuration |
example-vue-instantsearch-getting-started | Configuration |
Hmm bundle size is larger, doesn't seem to be due to non-working deduplication, maybe other features added since qs@6.9.7? cc @puruvjdev is this expected?
Hmm bundle size is larger, doesn't seem to be due to non-working deduplication, maybe other features added since qs@6.9.7? cc @puruvjdev is this expected?
I am looking at bundlephobia to see if that's the case, but it seems to be down. I'll let you know if that's the case.
EDIT: well, its after 6.9.7 only that the library went crazy
Well the real thing is that /legacy
is compiled to ES5, so it does add an extra 400bytes(min+br). That is the additional size we're seeing here. This is done so even very old libs and apps can use neoqs and avoid dependency hell. Also, there have been some additional features since 6.9.7 which do account for a few extra bytes here.
Only way the size would go down is by using the default build, which is ESM-only.
I'd suggest using neoqs/legacy now with the extra 1KB, if it's not too much, but whenever in future you decide to drop CJS support, switch to neoqs/modern
(It's gonna be 3.4KB only 👀, releasing sometime next week).
Lemme know if that helps. And thanks for considering this lib
Any update on this? 😁
Summary
Replace qs by neoqs. This doesn't have a bundlesize change, but it avoids us ever accidentally updating qs and having a big bump
Result
neoqs is API-compatible with qs in the legacy mode, and thus this isn't a breaking change. Of course if someone was already using qs and relying on it being deduplicated with the InstantSearch version.
URLs parsed and created by qs and neoqs are compatible