I wanted to add hardhat to a project that uses ES modules. Hardhat complains that I can't use require in the hardhat.config.js file, so I renamed it to import, but it still won't compile with the following error:
require() of ES modules is not supported.
There isn't a place where require is being called (I have replaced it with import), but it says otherwise. Any solution?