Reducing Bundle Size of Typesense-instantsearch-adapter
TLDR David raised concern about the large size of the typesense-instantsearch-adapter. Jason suggested enabling tree shaking to reduce the size and also recommended using an existing axios installation.
Oct 24, 2022 (14 months ago)
May I know what you used to generate this graphic? I can take a closer look
webpack-bundle-analyzeris analyzing the full contents of your node_modules folder, which by definition doesn’t use tree shaking.
Could you try turning on tree shaking in your webpack config, and then analyze the JS bundle file produced by webpack?
Separately, in your graph above, you want to include the contents of both algoliasearch-helper and instantsearch for comparison.
I also see that you already have axios installed, so I’m wondering if there’s some webpack config you could turn that just uses that axios instead of the one that’s mentioned in the typesense-js as a depenedency. That should reduce bundle size even further
Indexed 3011 threads (79% resolved)
Discussing Increased Bundle Size in Typesense Versions
Tom notices an increase in adapter and typesense bundle sizes, prompting a discussion with Jason. The latter explains a version upgrade targeting ES5 led to the increase. Tom plans to try calling TypeSense directly or using a fork.
Troubleshooting TypesenseInstantSearchAdapter without Node.js
John wanted to use TypesenseInstantSearchAdapter without Node.js. Jason helped by instructing to reference dist files directly, then fixing a bug that caused errors when doing so.
Issue Resolution on Typesense's Slack channel
Alex transferred issues from GitHub to Slack regarding a large package. Jason suggested a solution and released a reduced version. After testing, Alex confirmed the new version works well.