The Earth will only notice the change after eight minutes. This has been discussed many times, just recently in this thread: https://www.physicsforums.com/showthread.php?t=149144 (Caveat lector--not every post in that thread is accurate. )
BTW, I know you're just speculating about a hypothetical circumstance, but do note that, even though the Sun explodes, it still continues to have a gravitational influence. The mass doesn't simply vanish.
You could measure the drop in the gravitational field as the shell of mass and energy approached, passed and expanded out into the Solar System.