they had weapons to match the lightsaber before the extinction of the jedi. hence the whole extinction thing. its called surrounding and shooting at a distance.
It' still alot weaker. It can block ligthsaber attacks and white it hurts alot to get hit with a lighsaber itself deals way more damage. You couldn't get hit with a lightsaber as seen in this scene with that other weapon and survive. Strictly speaking its the first order and not the empire on top of that. So stormtrooper weaponry is still inferior to jedi and sith weaponry but i think thats needed for the movies to exist (and it kinda makes sense that your common soldier isnt as well equipped as the elite of the galaxy) because if the playing field between a single storm trooper and a jedi/sith would be equal or anything close to that we would need alot more jedi to have reasonable battles.