RequireJS and Search Insights #6367
Unanswered
giladmaker
asked this question in
Q&A
Replies: 1 comment
-
|
As a workaround, you can load the script yourself before loading InstantSearch, it will then use the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
This project is importing the Algolia search-insights package. In regards to using RequireJS, search insight's docs state:
https://github.com/algolia/search-insights.js/blob/main/docs/requirejs.md
The current project, however, does not seem to handle that scenario and always imports the non-iife module, resulting in the above error occurring when importing instantsearch using RequireJS.
Is there any plan to add RequireJS support that will cater for this issue? I could try raise a PR that falls back to importing the iife in the error handler of the current import, something like this (inside createInsightsMiddleware.ts):
Beta Was this translation helpful? Give feedback.
All reactions