我使用Laravel 5.8构建了一个项目,它依赖于select2插件。我做的每件事都是正确的。但是在编译项目之后 npm run dev 我有以下例外: Uncaught TypeError: $(...).select2 is not a function 我知道该怎么做。jQuery在此项目中连接了两次。jquery */ "./node_modules/jquery/dist/
我试图在rails 6中使用gem select2-rails中的select2。我已经添加了gemfile gem "select2-rails",运行了bundle和yarn add select2,以及.js require("select2")上的inport,但是当我尝试使用时$(...).select2 is not a function
我是怎么搞定这个的?