Ruby on Rails
Tuesday, February 12, 2019
Hello folks!
With webpacker becoming the defacto asset manager for JavaScript in Rails 6, I was wondering what the future holds for sprockets. According to dhh, Rails will still use Sprockets for other assets (https://github.com/rails/rails/pull/33079#issuecomment-399951955), but for how long?
The issue I have with webpacker is that it pulls too many dependencies (https://www.npmjs.com/package/@rails/webpacker/v/4.0.0-rc.7) and does too many things which I don't understand or want. Sprockets + uglifier gem does everything I need, but I am afraid that they will be deprecated and abandoned in the next few years. For the context: I don't use front-end frameworks, only JS sprinkles here and there.
Webpacker's dependencies (and their dependencies) pulls more than 886k lines of code (886025 to be precise). Given npm's track record, I am really nervous in adding almost 900k LoC to my project. Here is the command for the curious ones:
tree node_modules/ | find -type f -name "*.js" -exec cat "{}" \; | wc -l
Appreciate you taking the time to read this. Cheers!
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/3cfff5ec-2ffa-4a0c-b9b9-40db00536bc1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment