01 - Preheat oven to 350°F. Line a 9x9-inch baking pan with parchment paper, leaving an overhang for easy removal.
02 - Whisk together flour, baking powder, baking soda, salt, cinnamon, nutmeg, and ginger in a medium bowl.
03 - Whisk oil, granulated sugar, brown sugar, eggs, and vanilla in a large bowl until smooth and well combined.
04 - Fold the grated carrots into the wet mixture until evenly distributed.
05 - Add dry ingredients to the wet mixture and stir until just combined. Fold in nuts if using.
06 - Spread batter evenly into the prepared pan. Bake for 28–32 minutes, or until a toothpick inserted in the center comes out clean.
07 - Let cool completely in the pan on a wire rack before frosting.
08 - Beat cream cheese and butter together until creamy. Add powdered sugar, vanilla, and salt; beat until smooth and fluffy.
09 - Spread frosting evenly over cooled bars. Lift out using parchment paper, cut into 16 squares, and serve.