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
Tried all above solutions but the only way I'v managed to use select2 with webpack and rails6 was to add script loaded to the package and use it like:
import 'select2'; import 'script-loader!select2/dist/js/select2.js'; import 'select2/dist/css/select2.css';