I am able to access the Rails object by adding this to my pack: import Rails from "@rails/ujs"; window.Rails = Rails;