Skip to content

How do you manage dependencies? #135

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
krashidov opened this issue Dec 23, 2014 · 1 comment
Closed

How do you manage dependencies? #135

krashidov opened this issue Dec 23, 2014 · 1 comment

Comments

@krashidov
Copy link

Hello everyone,

I wanted to create a Rails app with React, following this tutorial:
https://medium.com/@olance/rails-react-browserify-e315001d5974

The summary of that tutorial is that he shows how to setup the react-rails gem and add browserify so that you can manage your dependencies using npm and load them with commonJS.

But, reading from the issues, it looks like commonjs and broweserify is not supported with this gem, (unless you use a workaround like #120 )

So my question is, what is the preferred or "first-class" way of handling dependencies ?

Thanks in advance!

@rmosolgo
Copy link
Member

I think the short answer is:

  • This gem works great if you do your dependencies Sprockets-style (eg, installing gems like underscore-rails or copy-pasting dependencies into app/assets/javascripts/vendor, then requiring them with //= require ....)
  • This gem doesn't have any trappings to support commonjs requires, and that's a known bummer. No PRs to fix it at the moment, just some suggested workarounds :)

@rmosolgo rmosolgo closed this as completed Jul 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants