'Significant and unexpected': Dying star spits out a sun's worth of mass just before going supernova