IMO most of the discussion in this thread is far too sanguine about Allied chances in this situation.
Imo you are ignorant about the french army.
At this time there were no Allied armies to speak of. The British army was largely destroyed in France; most of the men were evacuated at Dunkirk, but nearly all equipment was lost. The French army was in also destroyed. Even supposing a substantial number of troops could be evacuated to Algeria, they would have little or no equipment, and no source of new equipment. Or of ammunition, or fuel, or food. Britain was flat on its back, and had nothing to spare. The US was not providing any aid at this time - and was short of equipment for its own Army expansion.
The French army in North Africa was large and equiped. They had tanks, artillery and aircrafts, each in larager number than the italian had.
The RAF was in reasonable shape; it could - barely - prevent the Luftwaffe from controlling the air over Britain, but not stop the Blitz. The Armée de l'Aire was effectively destroyed. Even if a few aircraft could have been moved to Algeria, there would be no fuel or spare parts.
Most of the French air Force that would have been evacuated to North Africa would have been american aircrafts, with spare parts bought in the US aplenty.
Only in naval power were the Allies stronger than the Axis. The French Navy would be a substantial addition, but it would be a wasting asset, as French North Africa could not support it properly. (Nor could Britain supply ammunition or spare parts.)
Plenty of american corporations could supply ammunitions or spare parts, as ammunition is easy to produce, even for exotic calibers, and spare parts for the navy are rarely built assembly line styles and thus theri would be no difference if they were built in the US or in France.
In any case, the Allies would be unable to prevent large-scale Axis deployment to North Africa. In late 1942, Britain and the US were unable to prevent the Axis from deploying an entire Panzer Army to Tunisia, and that was after Italy's merchant shipping was depleted by two years of war, and while Germany was heavily engaged on the Eastern Front.
In OTL the axis controled both sides of the Med. In TTL, the axis would be lucky to still have one small port in 1941.
In 1940... The combined Allied navies can partially blockade Libya for a while, but at substantial and increasing cost as the Axis air forces develop effective anti-shipping techniques. Also it will be partial, as noted, so there will be at least enough Axis troops in Libya to defeat any Allied attacks.
In 1940 there was no anti tank weapon in Lybia that could pierce an R35, or D1 or H35. Those tanks were more numerous in North Africa than the infamously useless italian tanks. The only large port in Lybia is Tripoli, which is less than 200km from the tunisian border. Tripoli would fall in weeks once the French North African decided to take it
By fall 1940, the blockading will become insupportable, and the way will be clear for large Axis deployments, and the start of a powerful Axis drive into French North Africa. I don't see how the French can stop such a drive. Britain can do a bit to help, but not enough IMO.
With what navy ? with what air force operating from where ? OTL, the axis could barely support the small africa corps. No way it could invade French North Africa.
The British did manage OTL to deploy enough force to Egypt and East Africa for campaigns there. They still have to do East Africa or lose the Middle East, but they will go on the defensive in Egypt and support the French in North Africa. Even so, it is very hard to see how French colonial garrisons and a small British BEF can hold off, say, a third of the entire Wehrmacht.
A third of the wehrmacht ? Are you stupid ? IN OTL THE GERMAN AND THE ITALIANS COULD SUPPORT LESS THAN 20 DIVISIONS IN THE WHOLE AFRICAN THEATER.
You are predicting worse results for the allies while they are in a better posture than OTL and the axis in a worse one.
Also colonial garrison ? The bulk of the French Foreign Legions, Algerian tirailleurs and Morrocan Goumiers where in North Africa. Each of those have stellar records against the vaunted German übermenchen.
I will say that the extra French ships, and the use of French bases in Morocco and West Africa, will be a significant benefit in the Battle of the Atlantic.
There will be diplomatic consequences. As the Axis advances in Morocco, Spanish Morocco comes into the line of fire. If the Axis takes Morocco, Rio de Oro is between Morocco and West Africa, which the Axis cannot reach.
Even if Franco was a monster, he wasn't stupid. No way he would help Hitler. And they wouldn't take Morocco militarily.