Copy and paste this code into your terminal
DISCLAIMER: You should always review templates before running them. By running the template, you are agreeing to the terms of use.
The contents of this script as show. Any updates will be reflected in the below code and the snippet.
gem 'webpacker'
rails_command("webpacker:install")
def print_green(heredoc)
puts set_color heredoc, :green
end
print_green <<~DOC
CONGRATS ON FINISHING THE INSTALLATION
Here are some additional notes to complete the installation. These steps are
not automatically generated due to layouts being often heavily modified.
Add these to the appropriate layout file, like app/views/layouts/application.html.erb
<%= javascript_pack_tag 'application' %>
<%= stylesheet_pack_tag 'application' %>
To run the local webpack dev server, run
bin/webpack-dev-server
For additional documentation, check out https://github.com/rails/webpacker
DOC
A place where you can thank the author, post problems, give constructive feedback, etc. Be nice!