Rendering js from a Rails controller with webpacker
问题 Just replaced the js pipeline in my Rails app with webpacker . Most things work correctly, however controllers that render js no longer work as expected. def action format.js { render "javascript_partial" } end Normally, the above would execute a file in my view called javascript_partial.js.erb or action.js.erb if not specified in render . The problem seems to be that these files have no connection to the webpacker pipeline and thus cannot access global libraries like jquery or explicitly