Re:Why does a new Rails app need 106 MB of JavaScript?
by sosborn on Wednesday July 01, 2020 @04:17PM
(#23706037)
JS in rails is entirely opt-in.
[ Parent
| on HN ]
Re:Why does a new Rails app need 106 MB of JavaScript?
by WJW on Wednesday July 01, 2020 @04:42PM
(#23706382)
Opt-in means the default is without JS and you can enable it if you want. As shown in the gist, the situation is actually that by default all the JS is installed and you have to explicitly opt-out to prevent it from being installed.
Re:Why does a new Rails app need 106 MB of JavaScript?
by sosborn on Wednesday July 01, 2020 @05:10PM
(#23706749)
When you create a new rails project, the tooling for JS is set up, but none of that gets used (Turbolinks the only exception) unless you write or include JS code. The tooling does not affect the user experience one bit.
Re:Why does a new Rails app need 106 MB of JavaScript?
by cocktailpeanuts on Wednesday July 01, 2020 @04:42PM
(#23706384)
No. That's what it used to be in the old days, but not anymore.
I've been away from rails for a couple of years and recently came back to build a side project. The latest rails version shoves all kinds of JS stuff down your throat, you have to literally opt out.
The whole point of rails is "convention over configuration", and they have adopted the bloated NPM + Webpack ecosystem as their "convention".