Preheat the oven to 350°F and lightly grease your baking dish with butter.
Wash, peel, and slice the sweet potatoes into rounds, then arrange them in the greased baking dish.
In a small saucepan over medium heat, melt the butter with the sugars, cinnamon, nutmeg, ginger, and salt, stirring until the mixture thickens.
Stir in the vanilla extract, then remove the pan from the heat.
Pour the syrup over the sweet potatoes and stir until evenly coated.
Cover the baking dish with foil and bake for 40 minutes.
Remove the foil, toss the sweet potatoes so the ones on the bottom rotate to the top, and bake uncovered for 10 to 30 minutes more, or until fork-tender.
Let cool in the pan for 10 minutes before serving.