Re-implement page-specific JS in a better way.
What does this MR do?
- The current implementation does not work with Subresource Integrity (!4808 (merged))
- The current implementation doesn't allow caching of libraries because each page we hook up with this system will have a separate application.js. Meaning that for every page that uses Ace Editor, we'd have to load Ace Editor plus any GitLab-specific scripts in the same file, making local caching of just Ace Editor impossible.
- The current implementation is rather hacky.
Are there points in the code the reviewer needs to double check?
That Sprockets doesn't choke on this when we use precompiled assets.
What are the relevant issue numbers?
Does this MR meet the acceptance criteria?
- CHANGELOG entry added
- Documentation created/updated
- API support added
- Added for this feature/bug
- All builds are passing
- Conform by the style guides
Branch has no merge conflicts with
master(if you do - rebase it please)
- Squashed related commits together
Thanks to @pavelloz for his example implementation which was very useful.