-
Notifications
You must be signed in to change notification settings - Fork 114
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
Bootstrap not working #83
Comments
@omairrazam Bootstrap as imported there is a "script" not a "module". In modules, the Either load that file as a script, or use a version of Bootstrap that works as a module. For example via a module CDN which can handle this conversion process. |
@omairrazam I had some issues getting bootstrap and popper working with Rails 7.0.0.alpha2, finally fixed them by changing the relevant entries in
edit: those are newer versions of Bootstrap and Popper. I'm not sure if Bootstrap has an ESM ready version for 4.0.0. |
@ianneub Do dropdowns work when you import the pin "bootstrap", to: "https://ga.jspm.io/npm:bootstrap@5.2.2/dist/js/bootstrap.bundle.min.js" Bootstrap's docs seem to imply that the dropdowns don't work for the esm version:
|
//importmap.rb
`pin "jquery", to: 'https://code.jquery.com/jquery-3.2.1.slim.min.js'
pin "popper", to: 'https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js'
pin "bootstrap", to: 'https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js'`
//application.js
import "jquery" import "bootstrap"
It seems like
this
is undefined when loading library in importmap ecosystem.The text was updated successfully, but these errors were encountered: