vite_ruby
⚡️ Vite.js in Ruby, bringing joy to your JavaScript experience (by ElMassimo)
esbuild-rails
Esbuild Rails plugin (by excid3)
vite_ruby | esbuild-rails | |
---|---|---|
25 | 3 | |
1,156 | 174 | |
- | - | |
6.8 | 4.8 | |
2 days ago | 11 months ago | |
Ruby | JavaScript | |
MIT License | MIT License |
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
vite_ruby
Posts with mentions or reviews of vite_ruby.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-11-15.
- Vite Ruby: Bringing joy to your front end experience
-
Integrating Bun with Vite Ruby for Lightning-Fast Frontend Builds
With the recent release of Bun and its newfound support for Vite, coupled with Ruby on Rails 7.1 incorporating native support for Bun, developers can now enhance their web development workflow significantly. Here is the effortless process of enabling Bun for Vite Ruby, ultimately streamlining your front-end builds.
-
Rails Frontend Bundling - Which one should I choose?
Vite, in particular, ViteRuby is a solid option. It sits between ESBuild and Webpacker, and if you're looking at Webpacker, Vite may actually be a better option for you. It is a very solid option, and I've enjoyed using Vite personally.
- Issues upgrading webpacker v5->6 (intermediate step to shakapacker)
-
All The Rails Asset Pipelines
Yep. vite_rails (website/GitHub) is the way to go.
-
Setting up Svelte with Rails?
Use vite with https://vite-ruby.netlify.app/ if you don’t go the inertia route.
-
Setup Vite on Rails-7
--skip-javascript is necessary for avoiding conflicts on the next steps. In case of bootstrap/foundation-sites the asset pipeline is helpful so --skip-asset-pipeline is not applied.
-
Improve your frontend experience in Ruby with Vite.js;
Vite Ruby is an umbrella project with libraries that will allow you to easily integrate Vite at your favourite Ruby framework, such as Rails or Hanami, or a plain Rack app. If you are tired of waiting for webpack to compile, this project might be for you. Vite.js in Ruby ## Why Vite? 🤔 Vite does not bundle your code during development, which means the dev server is extremely fast to start, and your changes will be updated instantly thanks to HMR. This is great when adjusting styles, or tweaking behavior in JS. In production, Vite bundles your code with tree-shaking, lazy-loading, and common chunk splitting out of the box, to achieve optimal loading performance. ## Why Vite in Ruby? 🤔 Vite is great on its own, but configuring it correctly to work for a Ruby app structure requires knowledge of its internals. By following existing Rails and Rack conventions, and adding a few of its own, it becomes possible for ⠀everyone to leverage Vite and its wonderful features! If you are curious about the difference, check this Jumpstart Rails template.
-
Webpacker Retired
Vite Rails Docs
-
Autoreloading htmls in Browser with Rails 7
It something that basically doesn't work properly since the birth of Rails, 15 years ago. For beginners, this is a big disappointment. You have to tweak Guard-livereload (tricky and not always working, as you mentionned), or try things like browserSync (also tricky, also not always working...) My advice so far : keep Sprockets, in order to have a nice integration with older gems. And completly remove the current js-bundling + importmaps. Instead, replace with the gem 'vite_rails' (repo here : https://github.com/ElMassimo/vite_ruby).
esbuild-rails
Posts with mentions or reviews of esbuild-rails.
We have used some of these posts to build our list of alternatives
and similar projects. The last one was on 2023-05-09.
-
Is the default importmap method unrealistic in the most popular real world use cases?
Here's the setup I use for reloading with esbuild: https://github.com/excid3/esbuild-rails/blob/main/examples/esbuild.config.mjs
-
Configure Stimulus with esbuild and Babel — Rails & Javascript
// config/esbuild.mjs import path from 'path' import esbuild from 'esbuild' import rails from 'esbuild-rails' import babel from 'esbuild-plugin-babel' esbuild .build({ bundle: true, // Path to application.js folder absWorkingDir: path.join(process.cwd(), 'app/javascript'), // Application.js file, used by Rails to bundle all JS Rails code entryPoints: ['application.js'], // Destination of JS bundle, points to the Rails JS Asset folder outdir: path.join(process.cwd(), 'app/assets/builds'), // Enables watch option. Will regenerate JS bundle if files are changed watch: process.argv.includes('--watch'), // Split option is disabled, only needed when using multiple input files // More information: https://esbuild.github.io/api/#splitting (change it if using multiple inputs) splitting: false, chunkNames: 'chunks/[name]-[hash]', // Remove unused JS methods treeShaking: true, // Adds mapping information so web browser console can map bundle errors to the corresponding // code line and column in the real code // More information: https://esbuild.github.io/api/#sourcemap sourcemap: process.argv.includes('--development'), // Compresses bundle // More information: https://esbuild.github.io/api/#minify minify: process.argv.includes('--production'), // Removes all console lines from bundle // More information: https://esbuild.github.io/api/#drop drop: process.argv.includes('--production') ? ['console'] : [], // Build command log output: https://esbuild.github.io/api/#log-level logLevel: 'info', // Set of ESLint plugins plugins: [ // Plugin to easily import Rails JS files, such as Stimulus controllers and channels // https://github.com/excid3/esbuild-rails rails(), // Configures bundle with Babel. Babel configuration defined in babel.config.js // Babel translates JS code to make it compatible with older JS versions. // https://github.com/nativew/esbuild-plugin-babel babel() ] }) .catch(() => process.exit(1))
-
Live reloading with Ruby on Rails and esbuild
Finally, if you're using esbuild with Rails and Stimulus, you'll probably find the esbuild-rails plugin from Chris Oliver useful.
What are some alternatives?
When comparing vite_ruby and esbuild-rails you can also consider the following projects:
importmap-rails - Use ESM with importmap to manage modern JavaScript in Rails without transpiling or bundling.
jsbundling-rails - Bundle and transpile JavaScript in Rails with esbuild, rollup.js, or Webpack.
hotwire-livereload - Live reload gem for Hotwire Rails apps.
docker-rails-example - A production ready example Rails app that's using Docker and Docker Compose.
esbuild-plugin-alias - esbuild plugin for path aliases
Webpacker - Use Webpack to manage app-like JavaScript modules in Rails
Foreman - Manage Procfile-based applications
vite_rails - ⚡️ Vite.js in Ruby, bringing joy to your JavaScript experience [Moved to: https://github.com/ElMassimo/vite_ruby]
Tailwind CSS - A utility-first CSS framework for rapid UI development.
vite_ruby vs importmap-rails
esbuild-rails vs importmap-rails
vite_ruby vs jsbundling-rails
esbuild-rails vs hotwire-livereload
vite_ruby vs docker-rails-example
esbuild-rails vs esbuild-plugin-alias
vite_ruby vs Webpacker
esbuild-rails vs Foreman
vite_ruby vs vite_rails
esbuild-rails vs Webpacker
vite_ruby vs Tailwind CSS
esbuild-rails vs jsbundling-rails