I'm a bit confuse with the noation : When $x\in (0,1)$, does $$n\boldsymbol 1_{[0,1/n]}(x)=o(1)\quad \text{when }n\to \infty $$ or $$n\boldsymbol 1_{[0,1/n]}(x)=o_x(1)\quad \text{when }n\to \infty\ \ ?$$
I recall that $f(x)=o_y(x)$, mean that there is a function $\varepsilon _y$ (that depend on $y$) s.t. $f(x)=g(x)\varepsilon _y(x)$ and $\varepsilon _y(x)\to 0$ when $x\to 0$.
I'm asking this question because in the second comment of Did in this question, he wrote : take $h_n(x)\to 0$ for all $x\in [0,1]$ (that is $h_n(x)=o(1)$, right ?)
And I was confuse because I guess that he should have wrote $h_n(x)=o_x(1)$ when $n\to \infty $, and since he has high reputation, I think that maybe I'm wrong.
Your are right, and Did in their comment is right, and both of you raise the same problem. Asymptotic notation (big/little-o) can be very tricky when more than one variable is involved that changes, and that is what Did wants to point out in the comment to the asker of the question they responded to (I'll call them 'original asker' from now on), which made the very mistake you call out in your post.
Look at what Did wrote in their comment, before the part you quoted:
(emphasis mine)
Did is hinting at a counterexample to an (implicit) claim made by the original asker:
$$ h_n(x) = o_x(1) \Longrightarrow \int_a^bh_n(x)dx = o(1).$$
One counterexample (provided by you) is
$$h_n(x)=n\boldsymbol 1_{[0,1/n]}(x)$$
But since the original asker apparently did not understand the conceptual difference between $o_x(1)$ and $o(1)$, the former of which they never used, Did had to call them out on their own terminology. A function as yours, that satisfies $h_n(x) \to 0 \,\forall x \in (0,1]$, is what the original asker (incorrectly) described as $o(1)$. By using that same term, Did is saying: "Look, your claim is incorrect, use such and such as counter example".
Did did point to the underlying reason for the falseness of the claim in the part I highlighted above, the convergence $h_n(x) \to 0$ is non-uniform. This is exactly the point you are bringing up: Your $h_n(x)$ is $o_x(1)$, but not $o(1)$.