How to import Awesomplete?
airblade opened this issue · comments
Andy Stewart commented
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!
Andy Stewart commented
Hmm, it seems require('awesomplete')
on its own does the trick.