Menu

Post image 1
Post image 2
1 / 2
0

Rollup vs Esbuild for Rails

DEV Community·David Boureau·6 months ago
#q0TPf1mV
Reading 0:00
15s threshold

Article originally published here : https://alsohelp.com/blog/rollup-vs-esbuild-for-rails Rollup and esbuild are two ways to produce an production-optimized JavaScript file, thanks to jsbundling-rails. ESBuild vs Rollup locally You can create a new Rails application, with rollup for handling JS assets, with rails new myapp --database = postgresql -j = rollup -c = tailwind Enter fullscreen mode Exit fullscreen mode postgresql is necessary if you want to try the final result in production. For esbuild, try rails new myapp --database = postgresql -j = esbuild -c = tailwind Enter fullscreen mode Exit fullscreen mode Difference between ESBuild and Rollup locally Both are very transparent IMHO. I wrote several articles about the best way to handle JS with Rails some years ago, now I have to admit those articles are deprecated. It's set-and-forget setup, you don't have to care much about how JS files are handled. How great is that!…

Continue reading — create a free account

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

Read More