Is the damage to the second target from the Green-Flame Blade cantrip also doubled on a critical hit?


I’m thinking of a concept of a spellcaster that fight in melee from the moment I re-read the “blade” cantrips (green-flame blade and booming blade), and realized that they can deal a lot of damage. Long story short, I re-read the Assassin subclass, and was thinking about how they interact with critical hits.

If it is obvious that the secondary damage from booming blade doesn’t care about whether or not the initial attack was a critical hit, but how about green-flame blade (which basically gives you an automatic hit on another enemy)? How does green-flame blade‘s secondary damage interact with critical hits?

If I get a critical hit on the attack roll of green-flame blade, is the number of damage dice doubled for the damage to both targets? Or does it only double the damage dice for the first target?