4tablespoonsbutterroom temperature. Salted or unsalted is fine
Preheat the oven to 350 degrees F.
Line a 9×13 baking pan with parchment paper and spray with baking spray.
In your stand mixer or a large bowl with a hand mixer, mix the sugar and eggs for 1 minute. Add the pineapple, flour, baking soda, and salt. Mix until just incorporated.
Transfer the batter to the prepared baking pan. Bake for about 45 minutes until the top is golden brown and a toothpick inserted in the center comes out clean. Allow cake to cool.
While cake is cooling, make the cream cheese frosting. Mix together the cream cheese and butter (using a hand mixer or stand mixer). Add the vanilla and powdered sugar and mix to combine. Scrape down the sides occasionally and mix until combined and creamy.
Spread the icing over the cooled cakes and serve.
Leftovers can be kept in the fridge for up to 5 days.