I\'m currently trying Rails 6.0.0.rc1 which seems to have moved the default javascript folder from app/assets/javascript to app/javascript
My custom js has functions which will be called by embedded javascript of serveral html pages. Following snippet works in Rails6, compiled by webpacker:
say_hello = function(a_text){
console.log("HELLO "+ a_text);
}
<%= javascript_pack_tag 'my_functions' %>
Note : This line is inside html body, not in head