diff --git a/lib/install/template.rb b/lib/install/template.rb index 3136dd9cf..697b3b5be 100644 --- a/lib/install/template.rb +++ b/lib/install/template.rb @@ -36,7 +36,7 @@ if Webpacker::VERSION =~ /^[0-9]+\.[0-9]+\.[0-9]+$/ say "Installing all JavaScript dependencies [#{Webpacker::VERSION}]" - run "yarn add @rails/webpacker" + run "yarn add @rails/webpacker@#{Webpacker::VERSION}" else say "Installing all JavaScript dependencies [from prerelease rails/webpacker]" run "yarn add @rails/webpacker@next"