You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment, rake javascript:build runs yarn install && yarn build. In my opinion, yarn install should not be part of the javascript building step at all. If it needs to be there, there should at least be an option to disable this (e.g. by having a separate task for yarn install - which can be overwritten or via a ENV variable etc.).
css-bundling does the same thing - so if you are using both css-bundling and js-bundling gems, assets-precompile will run yarn install twice.
Not only does this take slightly longer, it means post-install scripts are run multiple times...
@IsmailM I believe like you that install should not be part of it. But it's sadly not the philosophy of this package #107 (comment)
You can just overwrite the build task, they said. That to me is equivalent to not using this gem as apart from the task it does not do much. In my case I just removed the gem and used my own task
jsbundling-rails/lib/tasks/jsbundling/build.rake
Lines 1 to 4 in 90833fb
At the moment,
rake javascript:build
runsyarn install && yarn build
. In my opinion,yarn install
should not be part of the javascript building step at all. If it needs to be there, there should at least be an option to disable this (e.g. by having a separate task foryarn install
- which can be overwritten or via a ENV variable etc.).css-bundling
does the same thing - so if you are using bothcss-bundling
andjs-bundling
gems, assets-precompile will runyarn install
twice.Not only does this take slightly longer, it means post-install scripts are run multiple times...
Also, see rails/webpacker#405.
The text was updated successfully, but these errors were encountered: