01 -
Preheat oven to 350°F (175°C). Grease and flour a 9x13-inch baking pan or two 9-inch round cake pans.
02 -
In a large bowl, whisk together flour, baking soda, salt, cinnamon, and nutmeg. In another bowl, beat together sugar, oil, eggs, and vanilla until smooth. Add dry ingredients to wet ingredients and stir until just combined. Fold in carrots, pineapple, coconut, and nuts if using.
03 -
Pour batter into the prepared pan. Bake for 35–40 minutes (or 30–35 minutes for round pans), until a toothpick inserted into the center comes out clean. Let the cake cool completely before frosting.
04 -
In a mixing bowl, beat cream cheese and butter until creamy. Add vanilla and a pinch of salt. Gradually beat in powdered sugar until smooth and fluffy.
05 -
Spread frosting over the cooled cake. Optionally, top with extra chopped nuts, coconut, or pineapple pieces for decoration.