  We study both entanglement and the R\'enyi entropies for the 2 dimensional
massless Dirac fermions in the presence of topological Wilson loops, which are
qualitatively different from those with a chemical potential and a current
source. In the language of $\mathbb{Z}_n$ orbifold theories, the Wilson loop is
interpreted as an electric operator while the orbifold twist operator as a
magnetic operator. Generalized topological transitions for the entropies are
driven by both electric and magnetic parameters via the restriction on the
operator's conformal weight. By adapting different normalizations for different
topological sectors, we achieve two goals: entanglement entropy can be obtained
with a smooth limit from the R\'enyi entropy, and the entropies are continuous
across the different topological sectors that include general Wilson loops
winding sectors. We provide exact results for the entropies in infinite space,
which depend only on the topological Wilson loops, independent of the chemical
potential and the current source.
