Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Example Rails 7 project with esbuild, SSR and Tailwind CSS #1308

ganchdev started this conversation in Show and tell
Discussion options

Hi all!

I've been thinking of giving this gem a shot for a new project I'm working on, so I decided to dive in and set it all up myself! I'm pretty happy about the result and how straightforward react-rails is for server-side rendered React, so I'm going to share this:

Example Project Repository

⬆️ This is the example project, and I've added some notes about what's being used.

Initially, I wanted to try to get it up and running with Vite, but encountered some weird issues with the vite-ruby gem, so I went for esbuild (via jsbundling-rails) instead, which is just as good (and standard now) for new Rails apps. Anything is better than Webpack in the end, and I'm glad I didn't have to fall back to it this time.

I'm open to questions and suggestions on how to improve it.

You must be logged in to vote

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

@naft-a

  1. did you give https://github.com/shakacode/react_on_rails a try as well?
  2. Why do you say:

ruby gem, so I went for esbuild (via jsbundling-rails) instead, which is just as good (and standard now) for new Rails apps. Anything is better than Webpack in the end

Shakapacker supports https://github.com/shakacode/shakapacker#esbuild-loader-configuration.

You must be logged in to vote
1 reply
Comment options

Hi @justin808

  1. Nope, I did not but may spin up a new project to try that one out!
  2. Mostly because I had bad experience with webpack in the past - being too flexible also made it too complicated and I just don’t care enough to really understand it. As for shakapacker/webpacker - I just wanted to have that setup as close as possible to the rails defaults which happens to be jsbundling-rails 🤷🏽
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /