The general rule is to add -s if you can count it. With the verb "like" the idea is the speaker is referring to a category, not a specific vegetable or fruit within that category; e.g., I like the fruit apples, not I like the fruit apple.
However, where and when to add -s is rather subjective. For some people, I am one, if the vegetable or fruit is small, or eaten whole, that is, if it's not sliced and diced, then -s isn't added; I like cucumber(s), carrots, potatoes, grapefruit(s), and pineapple(s), pumkin, and watermelon.
I wonder what others have to say.
All the best.