Skip to content

Commit b1f69b7

Browse files
authored
Merge pull request #1593 from algolia/feature/MAGE-999
MAGE-999: autocomplete umd added to the library and algoliaSearch umd…
2 parents eea3c6c + 4d1eb24 commit b1f69b7

File tree

3 files changed

+21
-7
lines changed

3 files changed

+21
-7
lines changed

view/frontend/requirejs-config.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@ var config = {
2020
}
2121
},
2222
paths : {
23-
'algoliaBundle' : 'Algolia_AlgoliaSearch/js/internals/algoliaBundle.min',
24-
'algoliaSearchLib': 'Algolia_AlgoliaSearch/js/lib/algolia-search.min',
25-
'algoliaAnalytics': 'Algolia_AlgoliaSearch/js/internals/search-insights',
26-
'recommend' : 'Algolia_AlgoliaSearch/js/internals/recommend.min',
27-
'recommendJs' : 'Algolia_AlgoliaSearch/js/internals/recommend-js.min',
28-
'rangeSlider' : 'Algolia_AlgoliaSearch/js/navigation/range-slider-widget',
23+
'algoliaBundle' : 'Algolia_AlgoliaSearch/js/internals/algoliaBundle.min',
24+
'algoliaSearchLib' : 'Algolia_AlgoliaSearch/js/lib/algolia-search.min',
25+
'algoliaAutocompleteLib': 'Algolia_AlgoliaSearch/js/lib/algolia-autocomplete.min',
26+
'algoliaAnalytics' : 'Algolia_AlgoliaSearch/js/internals/search-insights',
27+
'recommend' : 'Algolia_AlgoliaSearch/js/internals/recommend.min',
28+
'recommendJs' : 'Algolia_AlgoliaSearch/js/internals/recommend-js.min',
29+
'rangeSlider' : 'Algolia_AlgoliaSearch/js/navigation/range-slider-widget',
2930
},
3031
deps : [
3132
'algoliaInstantSearch',

view/frontend/web/js/autocomplete.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
define([
22
'jquery',
33
'algoliaBundle',
4+
'algoliaSearchLib',
5+
'algoliaAutocompleteLib',
46
'pagesHtml',
57
'categoriesHtml',
68
'productsHtml',
@@ -13,6 +15,8 @@ define([
1315
], function (
1416
$,
1517
algoliaBundle,
18+
algoliasearch,
19+
autocomplete,
1620
pagesHtml,
1721
categoriesHtml,
1822
productsHtml,
@@ -39,7 +43,7 @@ define([
3943
* Initialise Algolia client
4044
* Docs: https://www.algolia.com/doc/api-client/getting-started/instantiate-client-index/
4145
**/
42-
const searchClient = algoliaBundle.algoliasearch(
46+
const searchClient = algoliasearch(
4347
algoliaConfig.applicationId,
4448
algoliaConfig.apiKey
4549
);

view/frontend/web/js/lib/algolia-autocomplete.min.js

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)