Liberal commentators are aghast at President-elect Donald Trump's bullying tactics to prevent American companies such as Carrier from leaving for cheaper climes elsewhere. But when it comes to similar behavior on the part of liberal heroes, especially Bernie Sanders, most on the left have not an unkind word to spare. To the contrary, in fact.

Liberals are outraged by Trump's crude assertions of economic nationalism. For instance, this weekend, Trump went on Fox News Sunday and declared that letting companies shutter their American factories and move to other countries without facing any negative consequences wasn't free trade, it was "dumb trade." He wants a 35 percent border tariff on the imports of such companies — which, he says, he'll pair with reductions in America's ridiculously high corporate tax rates to diminish their incentive to move out in the first place.

Paul Krugman, the pugnacious New York Times Nobel laureate, declared Trump's antics "ridiculous" and "ominous," and warned that they mark a "descent into banana republic governance." Former Harvard University President Larry Summers, who served in the last two Democratic administrations, condemned Trump's tactics as "a change for the worse with regards to the operating assumptions of American capitalism." Vox's Matt Yglesias intoned that the "broader implications" of Trump's trade strategy are "menacing and banal."

They all happen to be right about Trump. But they were singing a very different tune when President Obama and his Treasury Secretary Jack Lew were engaging in similar rhetoric and worse behavior.

Take corporate inversion, for example. This is a practice where American companies merge with overseas subsidiaries to avoid not just America's sky-high corporate taxes but also its taxes on companies' foreign — as opposed to just domestic — earnings, something that no other OECD country does. Nothing really changes about the company except its street address on paper. No physical assets or factories are moved, hence there are no job losses.

Yet Obama and Lew went on a veritable rampage when Burger King merged with Canada's Tim Horton and Pfizer with Ireland's Allergan. They blasted these companies as "unpatriotic" and "corporate deserters" — actually scaring Walgreens into abandoning its plans to invert, not unlike what Trump has done with Carrier.

Instead of telling this Democratic duo to knock it off, the very same liberal commentators who are now going after Trump applauded Obama. Krugman accused these "artful corporate dodgers" of "shirking their civic duty." Summers dubbed the administration's moves "constructive" — while raising nary an objection to Obama's name-calling. Yglesias reported with a straight face that Obama was calling on these companies to show "economic patriotism" before voxsplaining all the good these anti-inversion policies might do.

What's more, many liberal pundits didn't want the president to simply stop at just bullying from the bully pulpit. They wanted him to do whatever it took to "halt inversions in their tracks" — including executive action if Congress refused to play ball. They counseled him, for example, to retroactively reclassify the tax-free debt of these companies as taxable equity. No qualms then, apparently, about America becoming a banana republic or the "menacing and banal" implications of such unilateralism for governance.

Hillary Clinton took their suggestions to heart, and pledged to not just take executive action against these companies but also impose a new "exit tax." There is no functional difference between her exit tax and Trump's border tariff. If anything, her exit tax is worse given that shareholders already pay taxes on their gains when companies invert. So it is a form of double taxation.

But the man who takes the cake when it comes to raising the hysteria level against free trade is none other than that old liberal darling, Sen. Bernie Sanders of Vermont. He hasn't just sailed into the sunset after matching Trump's anti-trade tirades decibel for decibel during his presidential bid. A couple of weeks ago, he proposed arguably the most draconian anti-trade legislation in living memory, called the Outsourcing Prevention Act.

His bill would bar companies such as Carrier that outsource "American" jobs from receiving any federal contracts. He would also impose a tax equal to the amount of savings achieved by outsourcing jobs or 35 percent of its profits, whichever is higher. Companies that outsource more than 50 jobs would be required to pay back federal tax breaks and loans and face tax penalties on stock options and bonuses.

Given that Sanders' anti-outsourcing crackdown, unlike Trump's, would be accompanied with no tax relief for companies, the net effect in the long run of this anti-outsourcing crackdown wouldn't be to save American jobs, but actually encourage automation by companies wishing to stay globally competitive.

This is all truly chilling stuff whose chief aim is to up the ante on Trump. So why aren't liberals directing some of their fire at him? Because Sanders is their populist demagogue.

Here is a truth about liberals: Whatever damage the Trump presidency will do to the cause of free trade — and it will be considerable — they would have allowed their leading contenders to get away with worse havoc, and in the name of economic nationalism to boot.