A building housing a mosque and school in the Twin Cities is a complete loss after an overnight fire, the facility manager said.