-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add equivalent task to "rake assets:clean" #1410
Comments
@swrobel There is one to remove everything: bundle exec rails webpacker:clobber
# env aware
RAILS_ENV=test bundle exec rails webpacker:clobber |
Thanks, I'm aware of that one, but that's like |
I think we will need an “assets clean” that act on webpacker’s assets |
For context, Heroku's ruby buildpack depends on assets:clean to make sure slug sizes don't get too big. https://github.com/heroku/heroku-buildpack-ruby/blob/v177/lib/language_pack/rails4.rb#L92 cc @schneems |
+1 to this. Our deploy script compiles assets locally and to save time not re-compiling everything we use assets:clean instead of clobber. |
And for me another thing I want just like assets:clean, by default it will keep 3 versions of the assets files. |
possible solution: heroku/heroku-buildpack-ruby#803 (comment) |
I've started on a solution here: master...ericboehs:eb-4-clean-task |
looking good! Send a PR! |
I don't think it's ready. I believe it needs to keep recent versions of the assets or active user sessions will break after a deploy. |
It's ready. Or as close to ready as I'm going to get it without some input. cc: @ytbryan @swrobel Edit: If someone wants to try it on Webpacker 3 (or 4), I made a monkey patch: https://gist.github.com/7121c96eab1d1041b8a7000ed2418e7c. |
Are there any news regarding this? Would be really helpful! |
+1 |
1 similar comment
+1 |
Looks like there as a cleanup plugin introduced for Webpacker itself, I added this, and it works great! It's a more integrated way of cleaning up those assets instead of relying on rails doing it. https://github.com/johnagan/clean-webpack-plugin |
I don't see any straightforward way to remove all of the outdated packs from
public/packs[-test]
... am I missing something?The text was updated successfully, but these errors were encountered: