Setup TailwindCSS, postcss and esbuild on Rails 7

This page summarizes the projects mentioned and recommended in the original post on dev.to

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • PostCSS

    Transforming styles with JS plugins

  • As we write more features we would need to organize our css files, write additional styles or wrap any tailwind components up using tailwinds @apply helper. Currently, we can’t import other css files into the main application.tailwind.css file because our node-powered TailwindCSS is provided by cssbundling-rails, which by default doesn’t allow it. Luckily we can fix it, thanks to postcss.

  • jsbundling-rails

    Bundle and transpile JavaScript in Rails with esbuild, rollup.js, or Webpack.

  • esbuild form JavaScript Bundling - (this post)

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • cssbundling-rails

    Bundle and process CSS in Rails with Tailwind, PostCSS, and Sass via Node.js.

  • TailwindCSS from CSS Bundling for Rails - (this post)

  • Ruby on Rails

    Ruby on Rails

  • I’m using Rails 7.0.4 and Ruby 3.0.4.

  • importmap-rails

    Use ESM with importmap to manage modern JavaScript in Rails without transpiling or bundling.

  • While I prefer using importmaps-rails to jsbundling-rails, I found many developers and companies want to have the ability to use JS libraries as they used with Webpack. Old habit I think.

  • tailwindcss-rails

  • Preconfigured TailwindCSS from TailwindCSS-rails ready to use out of the box, pass --css tailwind as an option.✅

  • Foreman

    Manage Procfile-based applications

  • We ran our app via bin/dev. You can find the div file inside ./bin/dev folder. It is a ruby wrapper over the process manager forman which manages Procfile-based applications. Rails automatically install foreman gem but it doesn’t bundle it because forman recommends NOT to do 🚫

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • Tailwind CSS

    A utility-first CSS framework for rapid UI development.

  • TailwindCSS from CSS Bundling for Rails - (this post)

  • chokidar

    Minimal and efficient cross-platform file watching library

  • First, we need to install chokidar to enable watching and automatically refreshing our files.

  • esbuild

    An extremely fast bundler for the web

  • Now, it’s time to write a costume configuration for esbuild. It will replace the default one which ships with jsbundling-rails gem. But, do we need to do so for rsbuild?! you might ask. The answer ‘sometimes’ is yes.

  • stimulus_reflex

    Build reactive applications with the Rails tooling you already know and love.

  • CableReady and StimulusReflex are installed for even more, server-powered frontend interactivity and reactive page updates.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Why are "already initialized constant" warnings so common?

    2 projects | /r/rails | 17 Jan 2023
  • How to Send Tailwindcss-Styled Emails With Ruby on Rails 7

    1 project | dev.to | 14 Nov 2022
  • railstart-niceadmin support more features

    37 projects | /r/rails | 16 Feb 2022
  • Most Popular Backend Frameworks of 2021

    10 projects | dev.to | 10 Oct 2021
  • Multi-Factor Authentication for Rails with WebAuthn and Devise

    10 projects | dev.to | 5 Oct 2021