01 -
Preheat oven to 350°F. Grease and flour a 9x13-inch baking pan.
02 -
In a large bowl, whisk together all-purpose flour, granulated sugar, and baking soda until evenly blended.
03 -
Add eggs, vanilla extract, and the entire can of crushed pineapple with juice to the dry mixture. Stir gently until thoroughly combined, taking care not to overmix.
04 -
Fold in 1/2 cup chopped walnuts if using, distributing them evenly throughout the batter.
05 -
Pour the batter into the prepared baking pan and spread it evenly. Bake for 30 to 35 minutes or until a toothpick inserted in the center emerges clean.
06 -
Transfer the pan to a wire rack and allow the cake to cool completely in the pan.
07 -
In a medium bowl, beat together softened cream cheese and unsalted butter until the texture is smooth and creamy.
08 -
Gradually add powdered sugar and vanilla extract, beating until the frosting is light and fluffy.
09 -
Spread the cream cheese frosting evenly over the cooled cake using a spatula.
10 -
If desired, sprinkle 1/2 cup chopped walnuts on top as a garnish before serving.