Preheat oven to 400 degrees. Line a baking sheet with parchment paper.
Trim the ends and peel the squash. Cut the squash lengthwise down the middle, and scoop out the seeds. Dice the squash into ⅓ inch cubes. Toss with the teaspoon of oil and spread evenly on the prepared pan. Bake 20 to 25 minutes or until tender. Remove the pan from oven and set aside.
Reduce oven temp to 350 degrees. Line two large baking sheets with parchment.
In a mixing bowl, use a fork to thoroughly combine the coconut oil and rosemary. Add both sugars and beat for one minute. Add the milk and vanilla and beat until fully incorporated and smooth.
Add the flour, salt, and baking soda to the bowl and mix well. Fold in about ¾ cup of the squash (you may not need to use all of it). Spoon heaping tablespoons of dough onto the baking sheets about 2 inches apart. Gently flatten each cookie with your fingers. Sprinkle the top of each cookie with a pinch of sugar, if desired. Bake 10 to 12 minutes or until the bottoms are golden brown.
Allow to cool on the sheets for about 5 minutes, then transfer to racks to cool completely.
Store leftover cookies in an airtight container at room temperature for up to 1 day, then refrigerate for up to 4 days.