Loading js libraries via register_asset

I wonder if this is an unintended side-effect of

(i.e. this only happens in development)