Open StevenLangbroek opened 10 years ago
@StevenLangbroek You'll have to provide an example app for me to see what's going on. The description is not enough.
@carsomyr I can't give you access to our repo (private). I'm not using the almond build, i tried settings digest
to false in our deploy script, i've tried adding the modules to the priority
node, but it just never compiles any other modules through r.js than the one we're loading through a requirejs_include_tag
. Is that intended behavior?
Ok, so I found out what's going on:
Our modules are in app/assets/javascripts/page_controllers
. If I put them in app/assets/javascripts
, and remove the folder name from requirejs.yml
modules list, it works as expected.
So before:
modules:
- name: 'main'
- name: 'dash/dash'
- name: 'page_controllers/applications'
- name: 'page_controllers/category_blacklists'
- name: 'page_controllers/companies'
- name: 'page_controllers/mediations'
- name: 'page_controllers/offer_filters'
after:
modules:
- name: 'main'
- name: 'dash'
- name: 'controller_applications'
- name: 'controller_category_blacklists'
- name: 'controller_companies'
- name: 'controller_mediations'
- name: 'controller_offer_filters'
Think this is quite the caveat, and should maybe go into README.md. Thoughts?
@StevenLangbroek That helps! I thought this issue was fixed a long time ago, but I'll take a second look.
@StevenLangbroek @carsomyr do you know if this is happening with paths too?
I think I'm misunderstanding the
modules
node inrequirejs.yml
. The documentation says:I've added a couple of modules in our requirejs.yml, like so:
However, when i set
RAILS_ENV=production
, and run$ bundle exec rake assets:precompile
, they do not get compiled. The only file that gets optimised byr.js
seems to be themain
module. The page_controller modules are dynamically called in main.js, but those calls fail as they're not inpublic/assets
. Any thoughts as to what's going on here?