There is nothing in the constitution that says a state can't decide electors based on the national popular vote. The constitution does not reserve that power to the federal government, it clearly gives it to the states. Therefore, no elector can argue that it is unconstitutional for a state to either require that they cast their electors vote for the national vote winner or be removed from as an elector is they refuse to do so. It takes away one of the clear arguments that would have been made against these laws.
The only constitutional argument is related to interstate agreements, which as I mentioned before, wouldn't stop the same individual states of each passing a version of the law that doesn't mention or rely on any agreement with the other states.