I'm currently 36 miles from the closest, it's worth a trip at least twice a month for me. You just gotta plan ahead a little more and stock up for less frequent trips. One thing I like doing is getting a travel size version of house hold cleaning stuff like dish or laundry soap to use as the thing to refill from the giant Costco jugs instead of lugging a gallon of soap every time.
Another non Costco tip is don't use dishwasher or laundry pods, even being cheaper from Costco, they're super overpriced for the same ingredients as a box of powder that you can get generic from any grocery store.