Consider $f: \mathbb{C} \to \bar{\mathbb{C}}$, $z \mapsto \exp\left(\frac{1}{z}\right)$. Is it analytic in a neighborhood of $0$?
I feel like it should be (since $z \mapsto \frac{1}{z}$ is a chart, and $z \mapsto \exp(z)$ is analytic near $0$), but I lack confidence because I never seriously studied Riemann surfaces before.
Note that your function is not even defined at $z = 0$. You can try to define it at $z = 0$ to be, say, $\infty$, but this is an essential singularity, so you won't get a continuous extension. So it can't be holomorphic.
In fact, a holomorphic function $f : \mathbb{C} \rightarrow \bar{\mathbb{C}}$ (as a map between Riemann surfaces) is the same as a meromorphic function or the constant map $z \mapsto \infty$.