After switching to Nginx, I've noticed a console error "unexpected end of file" in Chrome. The exact same file is fine though if served via Apache though. I tested by loading it from another domain being served by Apache.
The file is "uglified" using grunt uglify and what's interesting is when I skip this, it's parsed fine when served by Nginx. So Nginx seems to be breaking the uglified version only in some way.