LeaVerou / awesomplete

Ultra lightweight, usable, beautiful autocomplete with zero dependencies.

Home Page:http://leaverou.github.io/awesomplete/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to import Awesomplete?

airblade opened this issue · comments

I have a Rails 5 project using webpack. I have installed Awesomplete with yarn add awesomplete.

How do I access the Awesomplete object from my own code?

I have tried require('awesomplete') and import { Awesomplete } from 'awesomplete'.

But when I call const foo = new Awesomplete(myElement) I get the error:

__WEBPACK_IMPORTED_MODULE_1_awesomplete__.Awesomplete is not a constructor

Many thanks in advance!

Hmm, it seems require('awesomplete') on its own does the trick.