Installing Stimulus

Learn to install Stimulus locally in this lesson.

We'll cover the following...

Stimulus is one of the frameworks Webpacker is aware of, and, because of that, there’s a default path to installation within our Rails app.

The first thing we are going to do to install Stimulus is remove application/javascript/src and reset application/javascript/packs/application.ts back to its original application/javascript/packs/application.js form (the Stimulus installer expects it there). Then, we’re going to use Webpacker’s installer to add Stimulus:

$ bundle exec rails webpacker:install:stimulus

Here’s what the ...