jwhitley/requirejs-rails — Issue #25: Only one requirejs_include_tag allowed per page - why?
Author: nfedyashev
Created: 2012-01-12 19:09:10+00:00
State: open

I woud like to use require.js so that users don't need to load all assets when they visit my landing/home page. This must be pretty small and fast.

There is a logged-in mode with more assets/modules that needs to be pushed along with `base`. Why can't I do so?

<%= requirejs_include_tag 'base' %>
<% if logged_in? %>
<%= requirejs_include_tag 'logged-in' %>
<% end %>

btw, `base` and `logged-in` may have shared modules.

Perhaps, I misunderstand `Require.js` or `requirejs-rails` itself so please help