Preheat the oven to 350°. Grease 2 9-inch round cake pans with some nonstick baking spray or you can use cooking spray and sprinkle a couple of tablespoons of flour in each greased pan. Shake the pan gently to spread flour around evenly on the bottom and the sides. Turn the pans over and pat the excess flour out of the pan.
In a large bowl or stand mixer, add flour, sugar, baking soda, salt and blend until it is all combined.
Add in eggs, vanilla, and crushed pineapple and mix together until completely combined. If not using a mixer just use a whisk to stir together.
If using nuts, fold in the chopped pecans.
Divide the batter evenly between the prepared 9-inch cake pans
Bake for 30-35 minutes, check with a toothpick to make sure it's done. Be careful not to overcook or the cake will be dry.
Let cakes cool in the pans for 15 minutes. Then run a butter knife along the edge of the cake and pan to help separate it from the pan. Turn the pan over to take the cake layers out of the pans. You may have to gently tap the corners of the cake pan to loosen the cake up.
Cool cake layers completely on the wire rack or counter before frosting.