Most reports don't go into details of his death beyond that he was injured several weeks ago during a "jihadist mission."
However, bits and pieces (so to speak) of the reports indicate that he killed by a rocket explosion in a house in the al-Shojaeya neighborhood in Gaza City. He did not live in that neighborhood, and he was reported to have been killed in a rocket workshop, so the house itself was a rocket manufacturing facility.
Needless to say, building weapons in a residential neighborhood is a violation of international law. Not that people who pretend to care about international law in the region spend too much time looking at violations by Gaza terrorists.