-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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 v4: Tooltip and window.Tether #18647
Comments
Realized issue is closed but seeing at #17325 is locked to all except collaborators , and #17201 wasn't webpack specific, I thought I'd post my solution here. Rather than remove
and then in you app.js, include:
|
+1, why is this issue closed? using webpack, because of bootstrap, I had to make jQuery a global variable, BUT then, tether is still looked up in {
// Transpile ES6 to ES5 in Bootstrap V4
test: /bootstrap\/js\/src\/.*\.js$/,
loaders: [
'imports?jQuery=jquery,Tether=tether',
'babel?babelrc=true',
],
}, please guys, if you really need us to globally expose variables for bootstrap, at least make it consistent. |
See #18647 (comment) |
While playing around with ReactJS, BS4 and webpack, I ran into an issue with Tether.
Usually I would use
import Tether from 'tether'
andimport Bootstrap from 'bootstrap'
but since you use window.Tether I couldn't do that. Now I have to usewindow.Tether = require('tether')
.When mixing import and require that actually affects the loading order. Import seems to be loaded before require, no matter the order in the file. So I have to switch also Bootstrap to require.
Is there a way, we can remove window here?
https://github.com/twbs/bootstrap/blob/v4-dev/js/src/tooltip.js#L19
Or do you have a better idea how to solve this issue?
The text was updated successfully, but these errors were encountered: