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.
Rails 6 with Webpacker 6, Tailwind 2 with JIT, Postcss 8 and some default setup
51–60 of 101 posts
Re: Rails 6 with Webpacker 6, Tailwind 2 with JIT, Postcss 8 and some default setup
#52I 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.
Re: Rails 6 with Webpacker 6, Tailwind 2 with JIT, Postcss 8 and some default setup
#53Earlier quoted context omitted.
> 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.
Why not just use fixed versions and upgrade when you have a reason to?
Keeping your dependencies is boring and takes a lot of time, but the alternatives are far worse.
Re: Rails 6 with Webpacker 6, Tailwind 2 with JIT, Postcss 8 and some default setup
#54I 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.
I think the ideal would be some kind of middle ground: an optional contrib module, plugin, or even just documented pattern that can serve as an officially supported approach without baking a strong opinion directly into the framework.
Re: Rails 6 with Webpacker 6, Tailwind 2 with JIT, Postcss 8 and some default setup
#55Earlier quoted context omitted.
How often does your webpack setup blow up? We haven’t touched our configuration in a year and it still works perfectly fine. What complex things must you be doing for you config to not even last 3 months !!!
3 months might be (close to) hyperbole, but webpack/JS package management is a source of consistent pain. It sticks out like a sore thumb across my web stacks (PHP/WP, Ruby, Elixir) and its brittle complexity causes the most unpleasant dev experience I have to deal with. I doubt it's my incompetence alone - npm is involved in over 25% of Phoenix's issues!
All that to say, Rails is fine. But Node is also fine, if you treat it more like Go (minimal dependencies, lean on the vanilla underpinnings).
Re: Rails 6 with Webpacker 6, Tailwind 2 with JIT, Postcss 8 and some default setup
#56Earlier quoted context omitted.
It's still perfectly possible and valid to use Sprockets instead of webpack in a Rails app. That's what i do with every one of my applications and it works flawlesly
It works until you try using a library not available with Sprocket...
Re: Rails 6 with Webpacker 6, Tailwind 2 with JIT, Postcss 8 and some default setup
#57It'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.
We just use dependabot to issue PRs for updating dependencies, and we merge automatically when tests pass. It's never caused an issue.
Re: Rails 6 with Webpacker 6, Tailwind 2 with JIT, Postcss 8 and some default setup
#58I 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.
https://world.hey.com/dhh/modern-web-apps-without-javascript...
Re: Rails 6 with Webpacker 6, Tailwind 2 with JIT, Postcss 8 and some default setup
#59It'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.
Rails will soon default to using ESM instead of Webpack. https://world.hey.com/dhh/modern-web-apps-without-javascript...
Re: Rails 6 with Webpacker 6, Tailwind 2 with JIT, Postcss 8 and some default setup
#60It'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.
This is why Phoenix is ditching webpack! The story on the Elixir side is more compelling. I'm glad the team made this decision. https://sergiotapia.com/phoenix-160-liveview-esbuild-tailwin... Also medium sucks, please don't use it to write developer blogs. People can't read your article!