jwhitley/requirejs-rails — Issue #20: Ensure built assets loaded asynchronously hit fingerprinted URLs
Author: jwhitley
Created: 2011-12-17 23:48:39+00:00
State: open

Modules not inlined by r.js should hit fingerprinted URLs. Conceptually, this separates assets into three categories:

1. Assets inlined into another top-level module, as specified in the user's module config.
2. Assets which are top-level modules referenced by `requirejs_include_tag`
3. Assets which are top-level modules referenced by require() calls in the built app.

This can be done by generating appropriate entries for the paths config to r.js. The gem will need to be told which modules are referenced by method 2 vs method 3, above. A straw-man proposal is to do this in `config/requirejs.yml` like so:

```yaml
modules:
- name: "application"
- name: "page1"
exclude: "application"
- name: "page2"
exclude: "application"
requirejs-rails:
async: [ "page1", "page2", "page3" ]
```