WebDevStudios / wp-search-with-algolia

Improve search on your site. Autocomplete is included, along with full control over look, feel and relevance.
https://wordpress.org/plugins/wp-search-with-algolia/
145 stars 54 forks source link

Update InstantSearch.js Widget #21

Closed gregrickaby closed 3 years ago

gregrickaby commented 5 years ago

https://www.algolia.com/doc/api-reference/widgets/js/

gregrickaby commented 4 years ago

Update:

I've got the libraries (Algolia Search, InstantSearch, and InstantSearch CSS) being brought in via NPM, and bundled with WebPack in this branch:

https://github.com/WebDevStudios/wp-search-with-algolia/tree/feature/refactor-from-scratch

To Do:

richaber commented 4 years ago
  • Algolia's vanilla JS doesn't like to be bundled and is throwing an "ES" error. Why?

Import searchBox and hits from widgets.

import { searchBox, hits } from 'instantsearch.js/es/widgets';

Replace instantsearch.widgets.searchBox and instantsearch.widgets.hits with just searchBox and hits.

richaber commented 3 years ago

Closing, as of WPSWA version 2.0.0, we ship Algolia InstantSearch.js version 4.25.2