bootstrap4-toggle jQuery未定义

时间:2018-12-23 21:06:02

标签: javascript twitter-bootstrap bootstrap-4

在我的app.js中,

import $ from 'jquery'
import 'bootstrap'
import 'bootstrap4-toggle'

window.$ = $
window.jQuery = $

但是我得到了错误:

Uncaught ReferenceError: jQuery is not defined
    at eval (bootstrap4-toggle.js:182)
    at Object../node_modules/bootstrap4-toggle/js/bootstrap4-toggle.js (app.js:1407)

我认为导入是在window.jQuery = $之前完成的,但是如果之后再移动import 'bootstrap4-toggle',我仍然会遇到同样的问题。

我想念什么?

0 个答案:

没有答案
相关问题