I am getting referenceerror's from my browser console when importing Twitter Typeahead.js into Webpacker in my rails project. I added this, import typeaheadBundle from "typeahead.js"
, to my application.js
file (it was autocompleted by vs code and looked right). I can see in the sources panel in my browser that typeahead is included under webpack/typeahead.js/dist/typeahead.bundle.js
but I am still getting a reference error for Bloodhound, the bundled search engine. I can see references to other imported modules in the console like Turbolinks
, but there is no reference to the Typeahead classes. Is there something else I need to do to make these modules accessible to my script tags or am i importing incorrectly?