When you score a critical hit, you get to roll extra dice for the attack's damage against the target. Roll all of the attack's damage dice twice and add them together
*"Until the spell ends, you deal an extra 1d6 necrotic damage to the target whenever you hit it with an attack."
The spell Hex deals the damage not the attack. This is just like hunters mark. Hex is not the attack, Hex damage is not the attacks damage. Read the spell HEX and it does not say it adds to the weapons damage. It does not say it adds damage to the attack. In a math formula it would look like this : Damage = (weapon dice *2)+(modifiers)+(hex). The spell is doing extra damage upon the hit. The spells damage is not doubled because you crit with the sword attack.
As a side note to further this example: if you had hit a creature that is immune to your weapons damage say ... a wereduck for example, your weapon would do NO damage at all, but because you did hit him Hex would still proc for 1d6 nec damage as per the spell. If you look at the spell Divine Favor p.234 that spell actually says your weapon attacks deal an extra ... where hex clearly says HEX deals X damage upon a hit
So I am in the NO crit for hex camp, That is RAW and from what I can tell RAI as well