Star Wars and other franchises have used vibroblades, in which the blade achieves more cutting power and damage potential by a small power source that gives it kinetic ability. And of course Star Wars also has lightsabers. There are also many conventional melee weapons, with simpler modifications that can often prove effective under the right circumstances (like, say, coating a blade with toxins).
One significant advantage of such weapons as compared to ranged weapons is, they're much stealthier and typically don't need any sort of power source or ammunition. They don't make much noise and are often easier to conceal, as well as being less complex to build and maintain. Very handy in many ways.
I would say as far as upgrades, it would depend on which context they're being used in. I do think that ranged weapons are naturally more versatile in many cases, but a melee weapon makes a good backup option or in a ceremonial form.