Sure, but such a state was going to be Dem anyhow.
A small state has no incentive to sign up for a popular-vote compact. A swing state neither.
So California can agree to assign all its electors to the popular vote winner, and then maybe be forced to have them all vote for a Republican president. That would sure be fun. Yet another short-term idea that can backfire, like eliminating the filibuster for supreme court votes.