Turns out the script concatenation is working, I just needed to wrap the pure js properly.