Giselle is a young girl with romantic ideas who kills herself when she is betrayed by a dissembling lover. The story of Flaubert’s Madame Bovary is parallel but opposite.
Emma Bovary gets romantic ideas after her mother dies and she is married off to the equivalent of Hilarion. She has an affair with a rich seducer, the equivalent of Loys/Albrecht. He then horribly betrays her. She despairs and ends up killing herself. Unlike Giselle, Emma Bovary has no after-life and no redemption. Her life ends in penury and degradation. Her lover is unrepentant and unpunished.
Giselle premièred in 1841 but is set rather vaguely in the Rhineland at some earlier time. Madame Bovary, published in 1857, is set quite precisely in early 19th century Normandy (in the period 1827-1846). However, despite the distance between Giselle’s Rhineland and Emma’s Normandy, the situations of the two heroines are very similar. Both are vulnerable young women ripe for exploitation in a world of unscrupulous men.
When Madame Bovary was first published it was prosecuted for obscenity as "an outrage to public and religious morals". But anyone reading it would have recognised the plausibility of its plot.
By the same token, everyone who watched Giselle when it was first produced, while they would, no doubt, have enjoyed its romantic, redemptive story, would also have understood that, in the real world, Giselle’s career might much more closely have resembled Emma’s.
Mario Vargas Llosa writing about Madame Bovary says, "Emma's drama is the gap between illusion and reality, the distance between desire and its fulfillment". You could say exactly the same about Giselle.
Both masterworks, they present two sides of the same sad coin.