Hacker News new | ask | show | jobs
Webpack option suggested for Rails 5.1 (github.com)
60 points by tonytonyjan 3487 days ago
6 comments

Opinion forming:

Isn't this a way to invite volatility into the Rails ecosystem? Maybe instead of adding options for webpack, yarn etc. Rails should decouple itself from the front-end so that most of us can use our Preferred approachâ„¢

Alternately something in the vein of moonglum's gem [0] should also work but again, as an external lib. not part of Rails.

[0] - https://github.com/fejo-dk/rails_external_asset_pipeline

You could say that work is already done. Generate a rails API app and then use whatever front end you want.
Yes but that's geared towards building an API (ofc I can strip Rails however I like, dropping whatever I don't use) but it wasn't my main point - the tooling in the JS world changes rather quickly, now, this would imply lots of changes in main Rails just to support all of those external changes hence the volatility part in my comment.

For example looking at the Phoenix framework - they choose by default Brunch [0] but they also let you implement whatever you want.

It's still opinionated but they make it clear is not part of the core framework.

[0] - http://www.phoenixframework.org/docs/static-assets

It was clear ages ago that this should happen but this is rails catering to the market as it tends to do.
> Where Webpack really shines is for application-level JS. So that's also a way for having the two systems coexist, especially for existing apps.

I really like each version make Rails more complicated and hard to learn.

It seems it would actually change nothing because its a optional flag and you can simply not use it.

Also i cant really agree with that (doing Rails since 3).

Rails is the "kitchen sink" of web development, and promise you RAD. But is has become less relevant in the era of "everything is an API".
The original commit being linked to is actually for adding optional support for Yarn, which is awesome in itself:

"This add a package.json and the settings needed to get npm nodules integrated in new apps when the --yarn option is used (e.g rails new blog --yarn)."

Your title shocked me, glad it is actually just a optional addition.
I think this is great news. webpack + rails would make front-end simple yet powerful.