fix(js): Moved AMD's config inline since it can change on each page load.

Refs #6603, #6497.

TODO:
- [ ] Once registration system are separated again, check whether this is needed