Has anybody on this forum tried out either of Webpack or Lineman? I’m trying to figure out the best way to use React in a Rails project. I built this tutorial using the react-rails gem and I’d like to make these other options work using an alternative.
I do, however, like the concept of being able to prototype JS heavy client side screens without Rails. I’ve been using the default react-tutorial setup, adding a few pages of my own, as well as jsFiddle (example here).
Couple articles on Webpack:
- Setting Up Webpack with Rails
- WEBPACK IN THE RAILS ASSET PIPELINE
- Lineman Website
A project I did with Thoughtbot this year (my current company’s app) used Bower, and I’ve become a big fan. Since our intitial implementation, I’ve moved from using Bower in my build script (via Heroku) to loading Bower assets via Rails Assets. Rails Assets “gemifies” your Bower packages, so you declare them via your Gemfile. Every Rails Assets package includes the proper
=include directives you need to use in
Here’s a blog post I wrote about moving to Rails Assets: http://blog.cortexintel.com/blog/2014/07/bower-through-rails-assets/. Whether or not you use it, I can’t recommend Bower strongly enough.
@Justin_Gordon turns out your question was very timely as we just today had a dev discussion about ‘Alternative Asset Pipelines’ which touched on our thoughts on splitting out client side apps and managing the build process outside of Rails.
You can see that post here: Alternative Asset Pipelines