Menu

rspack_rails 2.3: Hotwire, TypeScript and Tailwind presets, plus a bundle analyzer, in one command
📰

rspack_rails 2.3: Hotwire, TypeScript and Tailwind presets, plus a bundle analyzer, in one command

DEV Community: ruby·Nguyễn Thanh Tùng·about 11 hours ago
#xd4FYcwu
#devtoruby#devto#dev#rspack#rails
Long article (747 words) — no AI summary yet.
Reading 0:00
15s threshold

rspack_rails bundles your Rails app's JavaScript and CSS with Rspack : hot module replacement in development, fingerprinted files that Rails serves itself in production, and one rspack.config.mjs that is yours.

Since 2.0 the gem has been deliberately small. It writes one config file and stays out of the way. The cost was setup: to get Turbo, TypeScript or Tailwind you added a few packages and a few lines of config by hand. Version 2.3 fixes that without taking the config away from you.

What's new:

Presets : hotwire , typescript and tailwind , at install time

rspack:analyze : a bundle report with Rsdoctor, in one command

rspack:doctor:fix now repairs packages and the Docker lockfile

A clearer stop when you run rspack:install on a default Rails app

Start a new app with everything wired up

RSPACK_PRESET = hotwire,typescript,tailwind \ rails new myapp --skip-javascript \ -m https://raw.githubusercontent.com/tungnt1203/rspack_rails/main/template.rb

cd myapp bin/dev

Enter fullscreen mode

Exit fullscreen…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.