The cell cycle process in which chromatin structure is compacted prior to and during mitosis in eukaryotic cells.