bootstrap-autocomplete
bootstrap-autocomplete copied to clipboard
How to import into webpack build?
Hi, i wanted to use the library in my webpack project. Unfortunately i can't find a way to import the library in my project.
I installed the library using npm:
npm install --save bootstrap-autocomplete
Then i tried to use the following js:
const jQuery = require('jquery');
const $ = jQuery;
import autoComplete from 'bootstrap-autocomplete';
$('.search-input').autoComplete(); // --> autoComplete ist not a function
I also tried unnamed imports or required imports, but still no luck.
Unfortunately i can't really figure out the module exports, because the main js file is minified.
What am i missing? Thank you!
I used it in a webpack environment import it as folowing:
import 'bootstrap-autocomplete/dist/latest/bootstrap-autocomplete';
Write something in the docs in release 3.0.0