Copy and paste this code into your terminal
The contents of this script as show. Any updates will be reflected in the below code and the snippet.
if !defined?(Webpacker) puts_red "Webpacker was not installed. Adding it now..." run "bundle add webpacker" end rails_command "webpacker:install:react"