stricter .js extension handling as per spec