Multiple cites separated by a line [duplicate]

a summary of my code would be what follows

\usepackage{biblatex}
\begin{document}
blah blah blah \cite{ref1, ref2, ref3, ref4, ref10}
\end{document}


With this code, I end up with something like this

blah blah blah [1,2,3,4,10]

However, I would like a more compact notation like

blah blah blah [1-4, 10]

How should I edit the prelude in order to achieve that? I have looked it up but haven't found an answer