Live data from Hacker News

Rails 6 with Webpacker 6, Tailwind 2 with JIT, Postcss 8 and some default setup

nauman.medium.com

41–50 of 101 posts

Re: Rails 6 with Webpacker 6, Tailwind 2 with JIT, Postcss 8 and some default setup

#41
post #5

It's telling that most instructions deal with the Javascript toolchain and not Rails itself. And let's hope that everything works and none of the 2000 imported node_modules blow up when this tutorial is 3 months old. I'm looking forward to Phoenix 1.6 which ditches Webpack for esbuild. Every step away from the insane churn of the modern frontend world is welcome.

> And let's hope that everything works and none of the 2000 imported node_modules blow up when this tutorial is 3 months old.

We have recurring Jira tickets for updating npm dependencies every two weeks. One developer is occupied between half a day and two days because the amount of breakage in the npm ecosystem is enormous. It’s ridiculous and sucks the life out of us.

Re: Rails 6 with Webpacker 6, Tailwind 2 with JIT, Postcss 8 and some default setup

#42
post #36
post #5

It's telling that most instructions deal with the Javascript toolchain and not Rails itself. And let's hope that everything works and none of the 2000 imported node_modules blow up when this tutorial is 3 months old. I'm looking forward to Phoenix 1.6 which ditches Webpack for esbuild. Every step away from the insane churn of the modern frontend world is welcome.

> I'm looking forward to Phoenix 1.6 which ditches Webpack for esbuild. Every step away from the insane churn of the modern frontend world is welcome. I don't like the churn either, but ditching X for Y only contributes to the churn.

Looks like Rails wants off Webpacker as well https://github.com/rails/importmap-rails

Re: Rails 6 with Webpacker 6, Tailwind 2 with JIT, Postcss 8 and some default setup

#43
post #4
post #2

Wait. So… you practically need to develop an app to start developing an app? When someone tells me to ‘invoke these 3 magic incantations’, I can sort of keep track of it. But here it seems like the instructions are to invoke these 300 magic incantations.

Yeah, one of the key selling points of Rails was that it was Omakase (Japanese: "I'll leave it up to you", i.e. you take the defaults Rails provides) and "batteries included" (i.e. there's enough provided in the box to get a working application). Having to jump through all these hoops (I'll note that one of the suggested gems is Devise, which provides a framework for user authentication) suggests either this is very…

This setup is deviating quite a bit from a default rails setup: using the beta webpacker, tailwind + plugins, some extra gems.

Also - I noticed the author says "foreman is the best way to develop locally". I encourage the author to give overmind a try - it is a drop in, more featureful replacement for foreman. I love it.

Re: Rails 6 with Webpacker 6, Tailwind 2 with JIT, Postcss 8 and some default setup

#44
post #5

It's telling that most instructions deal with the Javascript toolchain and not Rails itself. And let's hope that everything works and none of the 2000 imported node_modules blow up when this tutorial is 3 months old. I'm looking forward to Phoenix 1.6 which ditches Webpack for esbuild. Every step away from the insane churn of the modern frontend world is welcome.

That has been the most disappointing thing to me with rails. The ruby part of it is so nice. The front end has always made me feel doubtful. It’s not really the rails team fault that the frond end landscape is so tumultuous.

Re: Rails 6 with Webpacker 6, Tailwind 2 with JIT, Postcss 8 and some default setup

#46
post #5

It's telling that most instructions deal with the Javascript toolchain and not Rails itself. And let's hope that everything works and none of the 2000 imported node_modules blow up when this tutorial is 3 months old. I'm looking forward to Phoenix 1.6 which ditches Webpack for esbuild. Every step away from the insane churn of the modern frontend world is welcome.

It seems that swc is gaining more traction than esbuild, deno is using it, nextjs hired swc dev and rome is using swc too. Also one limitation by design of esbuild is lack of customization, you cannot hook into esbuild and do your own things, but I read you could with swc. But either way, both are way faster than the most popular ones.

It’s very easy to hook into esbuild. The simplicity and ease of integration is a big part of what I like about esbuild. I haven’t used swc, however, so I can’t comment on how it compares.

Re: Rails 6 with Webpacker 6, Tailwind 2 with JIT, Postcss 8 and some default setup

#49
post #14

Another reason to move to Elixir from Ruby...

Elixir is like the alternate town in Blazing Saddles. It looks great but you find out there aren’t really people nor library depth there. After it blows up your staffing and project plans you end up moving back.

Yeah, Elixir is great, but zealots keep acting like it's happening, and it is totally not happening.

Re: Rails 6 with Webpacker 6, Tailwind 2 with JIT, Postcss 8 and some default setup

#50
I do kind of wish Rails had just taken the 'bring your own JavaScript and CSS' route instead of wrapping Webpack and adding a boatload of confusion due to multiple layers of things that don't feel like they were designed to work together.

Tell me where to output my .js, .css and other assets and let me worry about compiling - or not as is often the case.

Post reply on HN