Skip to content

ES6 module in dist does not import bootstrap before using it #1

Closed
@mildred

Description

@mildred

I'm using use-bootstrap-select as an ES6 module, directly without any bundler like webpack or anything. The problem with the file dist/use-bootstrap-select.mjs is that it uses bootstrap (bootstrap.Dropdown.getOrCreateInstance(dropdownToggle)) but the bootstrap is never imported.

Either the ES6 module should import the bootstrap, and if the import name is not correct, there are always importmaps to fix that, or an alternative is to have the UseBootstrapSelect() tajke an optional parameter with bootstrap .

edit: Workaround would be :

import bootstrap from 'bootstrap.js'
window.bootstrap = bootstrap

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions