Lightweight JS Instant Search - low dependencies/no CDN

I’m interested in utilizing InstantSearch in a very locked down environment with strict security requirements that outlaw the use of a CDN, in addition to the majority of the dependencies included in the node package. Has anyone faced this issue before and implemented a lightweight/vanilla JS instantsearch? The only github project I found still made use of a CDN.

Hi @plogan

We use the CDN in our InstantSearch.js example because it’s an easier way to have a “ready to copy paste” example in a vanilla js environment.

But it’s very easy to convert any of those example to use instantsearch.js and algoliasearch (the search client) as npm packages:

I converted a simple code example here:

If you use a powerful bundler such as rollup, you can tree shake every part of InstantSearch.js you don’t use.

I hope this helps!

2 Likes