(1) "The weather isn't as good as what it was last year".
(2) "The weather isn't as good as the way (that) it was last year".
It's actually okay, though informal. In the usage shown in (1) "what" is known as a fused relative word where the meaning is roughly "the way that". It's called "fused" because the antecedent and the relative word are fused together instead of being expressed separately as in the simpler construction shown in (2).
Fused "what" occurs quite frequently; for example in "I've eaten what you gave me", fused "what" means "the thing(s) that".
And in "What you say is true", fused "what" again means "the thing(s) that".