Just replaced the js pipeline in my Rails app with webpacker.
webpacker
Most things work correctly, however controllers that render js no longer work as expected.
I had a similar problem where I had undefined $ on the string $("#element").html(
$("#element").html(
My configuration is similar to yours I solved by exposing at the end of the file pack/application.js
pack/application.js
windows.jQuery = jQuery window.$ = $