I\'m using webpack to manage all my assets, when I use this code to require select2 (https://github.com/select2/select2) I got the error
$(...).selec
You can run select2 in this way:
select2
import $ from 'jquery'; import 'select2'; // globally assign select2 fn to $ element import 'select2/dist/css/select2.css'; // optional if you have css loader $(() => { $('.select2-enable').select2(); });