In my magento 2.17 project, I have used a ESPL autocomplete plugin. For Autocomplete they are using twitter typeahead js. As I need to upgrade the typeahead.js, I just copied the new library content (typeahead.bundle.js 0.11.1) to my old library file so that the whole content is replaced. And then ran the upgrade and deploy commands. But in my search page I'm getting this error "ReferenceError: Bloodhound is not defined". Actually I haven't changed anything in the front end code. What I understand is the new library is not loaded by require js. Anybody have any Idea about this? Note : the new library is working fine with normal HTML page - outside the magento project
-
How are you loading that JS file, XML or Require JS?– Ben CrookCommented Sep 18, 2017 at 13:59
-
require js :var config = { paths: { 'espl/typehead': 'ESPL_Autocomplete/js/espl/typeahead.bundle' }, shim: { 'espl/typehead': { deps: ['jquery'] } } };– HariCommented Sep 18, 2017 at 15:06
-
@Hari, please tell me how this was fixed. I have a similar issue being faced while working on advanced JS bundling.– CodeForGoodCommented Apr 20, 2020 at 10:08
Add a comment
|