-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skip adding webpacker gem when generating dummyapp #3922
Skip adding webpacker gem when generating dummyapp #3922
Conversation
@@ -44,6 +44,7 @@ def generate_test_dummy | |||
opts[:skip_yarn] = true | |||
opts[:skip_bootsnap] = true | |||
opts[:skip_webpack_install] = true | |||
opts[:skip_javascript] = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is skip_webpack_install
needed if we have skip_javascript
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually not! 👍
Pushing the skip_webpack_install
removal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rails reference for webpack installation https://github.com/rails/rails/blob/6-1-stable/railties/lib/rails/generators/app_base.rb#L408
`skip-webpack-install` prevents rails to run the webpacker install task but the webpacker helper (javascript_pack_tag) is still included in `layouts/application.html.erb` as webpacker is the Rails 6 default. `--skip-javascript` avoids webpacker to be included in the rails generated app.[1] [1]: rails/rails#35484 (comment)
a06a461
to
b97c136
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@SamuelMartini thanks for the fix! 👍
Description
Currently, the dummy app generated to test extensions has the
javascript_pack_tag
helper included inlayouts/application.html.erb
. This is becauseskip-webpack-install
only prevents rails to run the webpacker install task but being webpacker the default for Rails 6, it is still included in the generated view.--skip-javascript
avoids webpacker to be included in the rails generated app.1Related pr #3326 where
--skip-javascript
is used in the sandbox generation.Checklist: