You can, but then your cost either balloons to insane levels, or you end up being much more vulnerable to mines. Minesweepers are usually very strongly built so that if they do set off a mine nearby they can survive, but it becomes exponentially harder to provide sufficient strength for that as hull size increases. They also tend to have reduced magnetic signature, either from nonmagnetic steel or wood, which added weapons and sensors will ruin so you would need to design special versions or accept a much bigger signature and more vulnerability. Building a heavily armed minesweeper as survivable in a minefield would basically cost as much as a high end DDG or even a CG for the combat capability of a corvette or light frigate, and it would still be vulnerable to loss from more modern mines getting lucky, and would cost much more
These days it is possible, if you abandon traditional sweeps and rely on drones and helicopters for the task. The LCS may be a failure, but that's not inherent to the concept, I've seen at least a couple other countries considering using drones for their future minesweepers based on larger, faster more conventional ships that can double as patrol vessels