Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to import into webpack build? #116

Open
chrisribal opened this issue Apr 30, 2021 · 2 comments
Open

How to import into webpack build? #116

chrisribal opened this issue Apr 30, 2021 · 2 comments
Labels
Milestone

Comments

@chrisribal
Copy link

chrisribal commented Apr 30, 2021

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!

@xcash
Copy link
Owner

xcash commented May 4, 2021

I used it in a webpack environment import it as folowing:

import 'bootstrap-autocomplete/dist/latest/bootstrap-autocomplete';

@xcash xcash added question triage Need more info or there is an open discussion tu fully undestand the issue labels May 4, 2021
@xcash xcash added this to the 2.4.0 milestone May 4, 2021
@xcash
Copy link
Owner

xcash commented Jun 18, 2021

Write something in the docs in release 3.0.0

@xcash xcash removed the triage Need more info or there is an open discussion tu fully undestand the issue label Jun 18, 2021
@xcash xcash modified the milestones: 2.4.0, 3.0.0 Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants