News for hackers. Stuff that matters.
Re:Why does a new Rails app need 106 MB of JavaScript? by mithr on Wednesday July 01, 2020 @04:18PM (#23706046)
You sort of missed the point. The point isn't "there's 106mb of code that will make it into production, but it's ok because other frameworks do it" -- the point is "looking at the size of the node_modules directory is not remotely representative of the final size of the bundled code that will make it to production, and this is in fact the way many modern frameworks work."

Two concrete examples: first, node_modules contains any development modules, which won't make it into the final code at all. Second, most of these packages are installed into the node_modules directory with typing support, full un-minified code, etc etc. When bundling the app for deployment, much of that goes away.

Re:Why does a new Rails app need 106 MB of JavaScript? by rileytg on Wednesday July 01, 2020 @04:45PM (#23706419)
The issue for me is nuanced. While it doesn't go to end users in production, it still ends up in my heroku buildpack. This sharp increase (33% of my allowed buildpack) was alarming.

Having been a rails and react developer for a very long time, i'm generally aware of the value added by all these files. I bring up these concerns almost to say "have we added too much? is it time to think about trimming back?".

Re:Why does a new Rails app need 106 MB of JavaScript? by johannes1234321 on Wednesday July 01, 2020 @04:28PM (#23706183)
Still it's 106MB which has to be audited, checked for license, ...
Re:Why does a new Rails app need 106 MB of JavaScript? by mithr on Wednesday July 01, 2020 @04:33PM (#23706260)
I don't think anyone's forcing you to use the rails CLI's "new" command to start a new rails project, if you're concerned about all of that and just don't want to deal with it... the docs explicitly say that this is a convenience method for getting started quickly with everything they think a modern developer would want. If you don't want that, that's a perfectly fine choice -- just start a new project from scratch, instead.