Fix JS dependencies for smart dev/production handling