The Monk's Martial Arts class feature is the classic example
At levels 5, 11, and 17, the damage die rolled for any monk weapon (any light weapon or a short sword) becomes d6, d8, and then a d10 respectively.
(PHB, The Monk, Table, page 77).
That changes the basic weapon's damage die using a class feature.
In the hands of a Monk, a dagger does 1d6 at 5th level (for others, it is still 1d4). It does 1d10 at 17th level, which is the same damage as done two-handed with a longsword(versatile) by anyone else.
Warlock Pact of the Blade + Improved Pact Weapon
The basic feature from pact of the blade
This weapon counts as magical for the purpose of overcoming
resistance and immunity to non magical attacks (PHB p. 107)
Improved Pact weapon (Invocation)
Prerequisite: Pact of the Blade feature
In addition, the weapon gains a +1 bonus to its Attack and Damage
Rolls, unless it is a Magic Weapon that already has a bonus to those
rolls. (xanathar's guide to everything)
Meets your criteria.
Is an invocation a class feature or a spell? Invocations are a class feature, that sometimes grant a spell, sometimes an ability, and sometimes grants other things.