Other than not using instantsearch.js, is there a ...
# community-help
d
Other than not using instantsearch.js, is there a way to reduce the bundled size of the typesense-instantsearch-adapter? the adapter itself is ~4 times larger than the actual instantsearch.js library
j
Hmm I see keys, synonyms, etc under the adapter, which technically shouldn’t be there when using the search client instead of client. Somehow tree shaking is not working… May I know what you used to generate this graphic? I can take a closer look
d
j
Cool thank you, will take a look
🙏 1
Ah, I see what’s happening. The
webpack-bundle-analyzer
is 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