https://yarnpkg.com/lang/en/docs/install/#debian-stable
Run Commands
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update && sudo apt-get install --no-install-recommends yarn
https://github.com/rails/webpacker (Check for latest directions)
Add gem
gem 'webpacker', '~> 4.x'
Run Commands
bundle install
bundle exec rails webpacker:install
bundle exec rails webpacker:install:stimulus
Be sure to add the webpack helpers where needed.
<%= javascript_pack_tag 'application' %>
To allow for ES6 usage.
config.assets.js_compressor = Uglifier.new(harmony: true)