Rails6 - how to make jquery available in chrome console?
I'm new to rails 6, webpack, etc
It's working for me in my app and jquery is loaded (thanks for the intro @Chris)
However - although jquery works correctly in all my loaded js, I can't use it to experiment in the chrome console.
Presumably this is because webpacker is 'being a good citizen' and not polluting the global namespace with $
however - it's really annoying not to be able to test thigns in the console without jquery. How do I override the default and just make $ global?
You can just assign it to the window variable so it's accessible anywhere I believe.
window.$ = window.jQuery = require("jquery")