If you wear prescription lenses this flips entirely: the lens is most of the cost and most of the quality, and the frame is close to a rounding error.
Worth knowing the two things that actually change the daily experience there: the index, which decides thickness, and the coatings. A cheap frame with good lenses is a much better purchase than the reverse, and shops push it the other way because the frame is where the margin is.