Hi i recently started working on Rails 6 with ruby 2.6.5. as the rails 6 has introduced the webpacks so i am trying to load my js files with the webpack. Although i have already required the jquery in the appliation.js still i am getting the below error:
'Uncaught ReferenceError: $ is not defined'
application.js
require("@rails/ujs").start()
require("turbolinks").start()
require("@rails/activestorage").start()
require("channels")
require('packs/jquery')
My 'jquery.js' file is inside the packs directory. Please let me know if i am missing something. Thanks in advance :)