Photo: Ramon Costa/SOPA Images/LightRocket via Getty Images
By steamrolling local taxi operations in cities all over the world and cultivating cheerleaders in the business press and among Silicon Valley libertarians, Uber has managed to create an image of inevitability and invincibility. But the company just posted another quarter of jaw-dropping losses — this time over $1 billion, after $4.5 billion of losses in 2017. How much is hype and how much is real?
The notion that Uber, the most highly valued private company in the world, is a textbook “bezzle” — John Kenneth Galbraith’s coinage for an investment swindle where the losses have yet to be recognized — is likely to come as a surprise to its many satisfied customers. But as we’ll explain, relying on the extensive work of transportation expert Hubert Horan, Uber’s investors have been buying your satisfaction in the form of massive subsidies of services. What has made Uber a good deal for users makes it a lousy investment proposition. Uber has kept that recognition at bay via minimal and inconsistent financial disclosures combined with a relentless and so far effective public-relations campaign depicting Uber as following the pattern of digitally based start-ups whose large initial losses transformed into strong profits in a few years.
Comparisons of Uber to other storied tech wunderkinder show Uber is not on the same trajectory. No ultimately successful major technology company has been as deeply unprofitable for anywhere remotely as long as Uber has been. After nine years, Uber isn’t within hailing distance of making money and continues to bleed more red ink than any start-up in history. By contrast, Facebook and Amazon were solidly cash-flow positive by their fifth year.
The fact that this glorified local transportation company continues to be a financial failure should come as no surprise. What should be surprising is that the business press still parrots the fond hope of Uber’s management that the company will go public in 2019 at a target valuation of $120 billion. That’s well above its highest private share sale, at a valuation of $68 billion. And Uber’s management and underwriters will no doubt hope that the great unwashed public looks past the fact that more recently, SoftBank bought out insiders at a valuation of $48 billion, and its offer was oversubscribed. Why should new money come in at a price more than double where executives and employees were eager to get out?
Uber has never presented a case as to why it will ever be profitable, let alone earn an adequate return on capital. Investors are pinning their hopes on a successful IPO, which means finding greater fools in sufficient numbers. Uber is a taxi company with an app attached. It bears almost no resemblance to internet superstars it claims to emulate. The app is not technically daunting and and does not create a competitive barrier, as witnessed by the fact that many other players have copied it. Apps have been introduced for airlines, pizza delivery, and hundreds of other consumer services but have never generated market-share gains, much less tens of billions in corporate value. They do not create network effects. Unlike Facebook or eBay, having more Uber users does not improve the service.
Nor, after a certain point, does adding more drivers. Uber does regularly claim that its app creates economies of scale for drivers — but for that to be the case, adding more drivers would have to benefit drivers. It doesn’t. More drivers means more competition for available jobs, which means less utilization per driver. There is a trade-off between capacity and utilization in a transportation system, which you do not see in digital networks. The classic use of “network effects” referred to the design of an integrated transport network — an airline hub and spoke network which create utility for passengers (or packages) by having more opportunities to connect to more destinations versus linear point-to-point routes. Uber is obviously not a fixed network with integrated routes — taxi passengers do not connect between different vehicles.
Nor does being bigger make Uber a better business. As Hubert Horan explained in his series on Naked Capitalism, Uber has no competitive advantage compared to traditional taxi operators. Unlike digital businesses, the cab industry does not have significant scale economies; that’s why there have never been city-level cab monopolies, consolidation plays, or even significant regional operators. Size does not improve the economics of delivery of the taxi service, 85 percent of which are driver, vehicle, and fuel costs; the remaining 15 percent is typically overheads and profit. And Uber’s own results are proof. Uber has kept bulking up, yet it has failed to show the rapid margin improvements you’d see if costs fell as operations grew.
Size also reduces flexibility. As professor Amar Bhide, author of the classic The Origin and Evolution of New Businesses, stated:
Many giga-businesses have no clue, when they start, about how they will become behemoths — think Microsoft developing Basic for the Altair in 1975, Sam Walton starting a country store, and Hewlett and Packard selling audio-oscillators. But being small, they can experiment to figure out what is profitably scaleable and make radical changes if necessary. Which is why not having deep pockets to start with is a blessing not a curse. Sure there are some fledgling companies, like Google and Amazon that happen to start in the right direction and being darlings of venture capitalists or Wall Street propels them ahead faster. But these are the exceptions. Otherwise money just bloats them and makes them hard to change direction.
But, but, but — you may say — Uber has established a large business in cities over the world. Yes, it’s easy to get a lot of traffic by selling at a discount. Uber is subsidizing ride costs. Across all its businesses, Uber was providing services at only roughly 74 percent of their cost in its last quarter. Uber was selling its services at only roughly 64 percent of their cost in 2017, with a GAAP profit margin of negative 57 percent. As a reference point, in its worst four quarters, Amazon lost $1.4 billion on $2.8 billion in sales, for a negative margin of 50 percent. Amazon reacted by firing over 15 percent of its workers.
Uber defenders might argue that that’s a big improvement from 2015, when revenues only covered 43 percent of costs, and the GAAP margin was negative 132 percent. But as we’ll discuss in more detail, this reduction in how much Uber spends to get each average dollar of revenue didn’t come from improved efficiency, but was due to almost entirely to cutting driver pay. The transportation company appears to have hit the limit of how much it can squeeze drivers, since churn has increased.
Uber has raised an unprecedented $20 billion in investor funding — 2,600 times more than Amazon’s pre-IPO funding. This has allowed Uber to undercut traditional local cab companies, whose fares have to cover all costs, as well as have more cars chasing rides than unsubsidized operators can. Recall that for any transportation service, there is a trade-off between frequency of service and utilization. Having Uber induce more drivers to be on the road to create fast pickups means drivers on average will get fewer fares.
If Uber were to drive all competitors out of business in a local market and then jack up prices, customers would cut back on use. But more important, since barriers to entry in the taxi business are low, and Uber lowered them further by breaking local regulations, new players would come in under Uber’s new price umbrella. So Uber would have to drop its prices to meet those of these entrants or lose business.
Moreover, Uber is a high-cost provider. A fleet manager at a medium-scale Yellow Cab company can buy, maintain, and insure vehicles more efficiently than individual Uber drivers. In addition, transportation companies maintain tight central control of both total available capacity (vehicles and labor) and how that capacity is scheduled. Uber takes the polar opposite approach. It has no assets, and while it can offer incentives, it cannot control or schedule capacity.
The only advantage Uber might have achieved is taking advantage of its drivers’ lack of financial acumen — that they don’t understand the full cost of using their cars and thus are giving Uber a bargain. There’s some evidence to support that notion. Ridester recently published the results of the first study to use actual Uber driver earnings, validated by screenshots. Using conservative estimates for vehicle costs, they found that that UberX drivers, which represent the bulk of its workforce, earn less than $10 an hour. They would do better at McDonald’s. But even this offset to the generally higher costs of fleet operation hasn’t had an meaningful impact on Uber’s economics.
But, you may argue, Uber has all that data about rides! Certainly that allows it to be more efficient than traditional cabs. Um, no. Local ride services have backhaul problems that no amount of cleverness can remedy, like taking customers to the airport and either waiting hours for a return fare or coming back empty, or daily urban commutes, where workers go overwhelmingly in one direction in the morning rush and the other way in the evening. Similarly, Uber’s surge pricing hasn’t led customers to change their habits and shift their trips to lower-cost times, which could have led to more efficient utilization. If Uber had any secret sauce, it would have already shown up in Uber revenues and average driver earnings. Nine years in, and there’s no evidence of that.
Uber also has much higher overhead costs: vastly better-paid employees, in prime office space, engaged in activities that a local cab company either rarely or never has to handle, like driver recruitment (Uber has recruitment centers), public relations and advertising, litigation, airfare, and other costs of running a global operation.
And Uber ought to have a higher cost of capital than a mature business that has (or at least had) pretty stable revenues and operations.
Uber has gone to some length to avoid publishing financial information on a consistent basis over time, a big red flag. One telling example: In late 2016, Uber targeted a share offering to high-end retail investors, which were presumably even dumber money than the Saudis that had invested in its previous round. Nevertheless, both JP Morgan and Deutsche Bank turned down the “opportunity” to market Uber shares to their clients, even though this could jeopardize their position in a future Uber IPO. Why? The “ride sharing” company supplied 290 pages of verbiage, but not its net income or even annual revenues.
In keeping, while Uber presented a full profit-and-loss statement for the first and second quarters of 2018, it gave only three line-items for the last quarter, when its margins worsened.
While Uber has reduced its negative gross margin over time, those improvements have come mainly from squeezing driver compensation, so that they now net less per hour on average than taxi operators. Through 2015, 80 percent of fares went to drivers. In its early years, Uber gave drivers high payouts to attract good drivers and also offered drivers incentives to buy cars. Uber cut that to as low as 68 percent, then partially reversed it as driver turnover became acute to its current, roughly 70 percent level. In 2017, Uber’s margin as reported using GAAP was a negative 57 percent. It would have stayed at the negative triple-digit level absent the driver pay-throttling.
I needed a ride from Burbank to LAX on a Thursday morning around 5:45 AM. I requested a car the night before. At pickup time there wasn’t a Lyft or Uber within 20 miles. When I did get one the driver said that at the rate they are being paid it wasn’t worth getting out of bed early anymore.
Uber’s other way of making its margins less terrible has been ditching its worst operations. But even then, Uber’s new CEO Dara Khosrowshahi effectively admitted that Uber isn’t profitable in any market when you factor in corporate overheads. Uber has been frantically adding new business like Uber Eats and scooter rentals to keep its growth story alive. Uber not only tacitly admits that they aren’t covering their costs, it refuses to give any detail about these operations beyond their revenues and does not discuss what it would take for them to turn the corner.
But what about driverless cars? Let’s put aside that some enthusiasts like Apple co-founder Steve Wozniak now believe that fully autonomous cars are “not going to happen.” Fully autonomous cars would mean Uber would have to own the cars. The capital costs would be staggering and would burst the illusion that Uber is a technology company rather that a taxi company that buys and operates someone else’s robot cars.
Uber has succeeded in getting the business press to treat its popularity as the same as commercial success. A few tech reporters, like Eric Newcomer of Bloomberg, have politely pointed out that Uber’s results fall well short of other tech illuminati prior to going public. The pitch that dominance would produce profits is demonstrably false and Uber seems unable to come up with a new story. There’s every reason to think that investors, not local cab companies, will wind up being Uber’s biggest roadkill.
By submitting your email, you agree to our
Terms and Privacy Notice
and to receive email correspondence from us. This site is protected by reCAPTCHA and the Google
Privacy Policy and
Terms of Service apply.
or
Already a subscriber?
What is your email?
This email will be used to sign into all New York sites. By submitting your email, you agree to our Terms and Privacy Policy and to receive email correspondence from us.
Password must be at least 8 characters and contain:
Lower case letters (a-z)
Upper case letters (A-Z)
Numbers (0-9)
Special Characters (!@#$%^&*)
This password will be used to sign into all New York sites. By submitting your email, you agree to our Terms and Privacy Policy and to receive email correspondence from us.
You’re in!
As part of your account, you’ll receive occasional updates and offers from New York, which you can opt out of anytime.
or
Already a subscriber?
What is your email?
This email will be used to sign into all New York sites. By submitting your email, you agree to our Terms and Privacy Policy and to receive email correspondence from us.
Password must be at least 8 characters and contain:
Lower case letters (a-z)
Upper case letters (A-Z)
Numbers (0-9)
Special Characters (!@#$%^&*)
This password will be used to sign into all New York sites. By submitting your email, you agree to our Terms and Privacy Policy and to receive email correspondence from us.
You’re in!
As part of your account, you’ll receive occasional updates and offers from New York, which you can opt out of anytime.
Already a subscriber?
Already a subscriber?
`;
// integrate Sub(x) scripts and elements
if (hostname !== 'subs.nymag.com') { // do not integrate on this subdomain
document.head.appendChild(trackingScript);
document.body.insertAdjacentHTML('beforeend', subXAnimationElements);
}
There was an error processing the request. Please try again later."}).catch(e=>console.error("Error verifying email: ",e)))(r.querySelector(".content"),o.bannerCTAVerification)})):(l.remove(),s.remove()),o.dismissable||n.remove(),o.useAlertIcon||a.remove(),r.classList.add("show"),n.addEventListener("click",()=>{u(),r.classList.remove("show")})}else r.remove()}});
}, {"3":3,"6":6,"17":17,"35":35,"40":40}];
window.modules["global-nav.client"] = [function(require,module,exports){"use strict";const dom=require(4),auth=require(17),signInButton=dom.find(".user-signin"),signOutButton=dom.find(".user-signout"),globalNav=dom.find('[class^="global-nav"]'),body=dom.find("body"),dropdownItems=dom.findAll(".dropdown-wrap"),gtm=require(3),appendLandingPageParams=require(135),pageUri=require(125).getPageUri(),subscriptionPromoLinks=dom.findAll(".persist-params"),searchString=window.location.search||"";function closeDropdowns(e){let n=globalNav.querySelectorAll(".dropdown.open");dropdownItems.forEach(function(t){let i=t.querySelector(".dropdown");!n||t.contains(e.target)&&27!==e.keyCode||i.classList.remove("open")})}function gtmSendReport(e,n,t){let i={eventCategory:"ecommerce",eventAction:"componentClick",brand:e,dimension23:"global-nav",list:pageUri,pageZone:"header",variant:"nav-link"};"global-nav-link"===t&&(i.eventLabel=n.href),gtm.reportNow(i)}function updateElementTargetUrlsIfQueryStrings(e){if(searchString){const n=new URLSearchParams(searchString);let t=e.href;if(t.includes("?")){const i=t.split("?"),o=new URLSearchParams(i[1]);for(let e of n.entries())o.set(e[0],e[1]);t=`${i[0]}?${o.toString()}`,e.href=t}else e.href=`${t}?${n.toString()}`}}function init(e){const n=e.querySelectorAll(".to-landing-page");window.addEventListener("auth:init",()=>{signInButton.addEventListener("click",function(e){e.preventDefault(),auth.showEmbeddedLoginFlow("top navigation")}),signOutButton.addEventListener("click",function(e){e.preventDefault(),gtmSendReport("Sign Out",e.target,"user-info-link"),auth.logout()}),auth.isAuthenticated()&&e.classList.add("signed-in"),(auth.isSubscriber()||auth.isMobileAppRequest())&&e.classList.add("subscribed"),e.querySelectorAll(".user-link").forEach(e=>{e.classList.add("active")}),subscriptionPromoLinks.forEach(e=>{updateElementTargetUrlsIfQueryStrings(e)}),appendLandingPageParams(n)})}dropdownItems.forEach(function(e){e.addEventListener("click",function(){e.querySelector(".dropdown").classList.toggle("open")})}),body.addEventListener("click",closeDropdowns),document.addEventListener("keydown",closeDropdowns),globalNav.addEventListener("click",function(e){let n=e.target;n.classList.contains("global-nav-track")&>mSendReport(n.text,n,"global-nav-link")}),module.exports=init;
}, {"3":3,"4":4,"17":17,"125":125,"135":135}];
window.modules["aaa-module-mounting.legacy"] = [function(require,module,exports){"use strict";const _pickBy=require(221),_each=require(408),Fingerprint2=require(407),DS=require(406),Eventify=require(246);function registerGlobals(){window.DS=DS,window.Eventify=Eventify,window.Fingerprint2=Fingerprint2,DS.value("Eventify",Eventify),DS.value("Fingerprint2",Fingerprint2),DS.value("$document",window.document),DS.value("$window",window)}function mountDollarSliceComponents(){DS.service("components",["$document","$module",function(e,n){var o=_pickBy(n.definitions,e=>e.providerStrategy===n.providers.controller),r=Object.keys(o);function t(e){return o=>{try{n.get(e,o)}catch(e){logMountError(o,e)}}}_each(r,n=>{var o=e.querySelectorAll('[data-uri*="/_components/'+n+'/"]'),r=e.querySelectorAll('[data-uri$="/_components/'+n+'"]');_each(o,t(n)),_each(r,t(n))}),this.components=r}]),DS.get("components")}function logMountError(e,n){const o=e.outerHTML.slice(0,e.outerHTML.indexOf(e.innerHTML));console.error("Error attaching controller to "+o,n)}registerGlobals(),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",()=>{mountDollarSliceComponents()}):mountDollarSliceComponents();
}, {"221":221,"246":246,"406":406,"407":407,"408":408}];
window.modules["ads.legacy"] = [function(require,module,exports){"use strict";const _map=require(118),_forEach=require(107),_isString=require(268),_intersectionWith=require(409),_isEqual=require(274),_each=require(408),_debounce=require(182),_sortBy=require(205),page=require(125),visit=require(114);DS.service("adService",["Eventify","$cid","$document","$window",function(e,t,a,i){var o,n,s,r,d,c,u,l,g={},p=this,h=[],f=visit.getQueryParamsObject(["utm_campaign"]),m=document.querySelector('script[data-type="ad-a9"]'),b=[],w=!1,v=[],y=document.querySelector('script[data-name="ad-doubleverify"]');document.querySelector('script[data-name="concert-ads"]')||(i.NYM={},i.NYM.analytics={},i.NYM.analytics.adStartTime=i.performance.now(),i.googletag=i.googletag||{},i.googletag.cmd=i.googletag.cmd||[],u=i.googletag,(m||y)&&(i.googletag.cmd=i.googletag.cmd||[],i.googletag.cmd.push(function(){i.googletag.pubads().disableInitialLoad()})),m&&(l=i.setInterval(function(){void 0!==window.apstag&&void 0!==window.apstag.timeout&&(i.clearInterval(l),window.apstag.cleared=!0,l=null)},10),setTimeout(function(){l&&(i.clearInterval(l),i.googletag.pubads().refresh(),window.apstag||console.log("MESSAGE: Timeout for A9 load exceeded, aborting"))},500)),y&&(b.push(new Promise(function(e){w?e():v.push(e)})),c=i.setTimeout(T,2500)),o=function(e){var t,a,o=e.data,n=[];return o.loaded?e:(o.loaded=!0,t=null,(t=o.sizes?u.defineSlot(o.name,o.sizes,o.id).addService(u.pubads()):u.defineOutOfPageSlot(o.name,o.id).addService(u.pubads())).setTargeting("adid",o.id),f.hasOwnProperty("utm_campaign")&&t.setTargeting("utmcamp",f.utm_campaign),a=p.getAdCount(o.label),t.setTargeting("label",o.label+"_"+o.site+"-"+a),u.display(o.id),u.pubads().addEventListener("slotOnload",function(){i.NYM.analytics.firstAdLoadTime||(i.NYM.analytics.firstAdLoadTime=i.performance.now(),i.NYM.analytics.firstAdLoadLabel=e.data.label)}),n=_(o),Promise.all(b).then(function(){n?window.apstag&&window.apstag.cleared?window.apstag.fetchBids({slots:[n],timeout:window.apstag.timeout},function(){u.cmd.push(function(){window.apstag.setDisplayBids(),u.pubads().refresh([t],{changeCorrelator:!1})})}):y&&u.pubads().refresh([t],{changeCorrelator:!1}):u.pubads().refresh([t],{changeCorrelator:!1})}),e.slot=t,e)},n=function(e){var a,i,o,n=t(),s=e.getAttribute("data-name"),r=e.getAttribute("data-sizes"),d=e.getAttribute("data-label"),c=e.getAttribute("data-site");n=e.id,r&&r.length?(r=r.split(","),a=[],_map(r,function(e){e=e.split("x"),i=parseInt(e[0]),o=parseInt(e[1]),a.push([i,o])})):(e.classList.add("oop"),a=!1),this.data={id:n,name:s,sizes:a,loaded:!1,label:d,site:c},g[n]=this},r=function(e){u.cmd.push(function(){var t=o(e);g[e.data.id]=t})},s=function(e){var t=[];e.slot?(t=_(e))&&window.apstag&&window.apstag.cleared&&window.apstag.fetchBids({slots:[t],timeout:window.apstag.timeout},function(){u.cmd.push(function(){window.apstag.setDisplayBids(),u.pubads().refresh([e.slot],{changeCorrelator:!1})})}):e&&r(e)},u.cmd.push(function(){var e,t,o,n=page.getMeta("article:tag"),s=page.getMeta("author"),r=i.location.href,d=(e=a.head.querySelector(".head-gtm"),t=a.body.querySelector(".gtm"),e&&"top"===e.getAttribute("data-gtm")?"gtmtop":t&&"bottom"===t.getAttribute("data-gtm")?"gtmbottom":"");o=[],_forEach([n,s,d],function(e){_forEach(e.split(","),function(e){(e=e.trim().toLowerCase().replace(/\s/g,"-").replace(/\'|\’/g,"")).length&&o.push(e)})}),u.pubads().setTargeting("kw",o),u.pubads().setTargeting("entry_group",o),r=r.slice(r.lastIndexOf("/")+1),u.pubads().setTargeting("pn",r),u.companionAds().setRefreshUnfilledSlots(!0),u.pubads().enableAsyncRendering(),u.enableServices()}),this.load=r,this.create=function(e){return new n(e)},this.refresh=function(e){var t;_isString(e)?(t=this.getById(e),s(t)):s(e)},this.remove=function(e){var t=e.data.id;a.getElementById(t).innerHTML=""},this.getAdCount=function(e){var t,a=0,i=Object.keys(g);return _each(i,function(i){(t=g[i]).data.loaded&&t.data.label===e&&a++}),a},this.getById=function(e){return g[e]},d=_debounce(function(){var e={TopLeaderboard:1,RightColTopMPU:2,outOfPage:99,"homepageTakeover/TopLeaderboard":1},t=_sortBy(h,function(t){return e[t.data.label]||10});_forEach(t,function(e){return e.data.sizes?r(e):i.setTimeout(function(){r(e)},2e3)}),y&&window.PQ.cmd.push(()=>{try{window.PQ.loadSignals(["ids","bsc","vlp"],T)}catch(e){T(),console.error(`There has been an error loading Double Verify signals: ${e}`)}}),h=[]},10),this.addToPageLoadQueue=function(e){h.push(e),d()});function _(e){var t,a=e.sizes;return a=_intersectionWith(a,[[970,250],[970,90],[728,90],[300,600],[300,250],[320,100],[320,50]],_isEqual),e.sizes&&e.sizes.length&&(t={slotID:e.id,sizes:a,slotName:e.label}),t}function T(){i.clearTimeout(c),w=!0,_forEach(v,function(e){e()})}}]);
}, {"107":107,"114":114,"118":118,"125":125,"182":182,"205":205,"268":268,"274":274,"408":408,"409":409}];
window.modules["cid.legacy"] = [function(require,module,exports){"use strict";DS.service("$cid",function(){var r=Math.floor(100*Math.random());return function(){return"cid-"+ ++r}});
}, {}];
window.modules["client.legacy"] = [function(require,module,exports){"use strict";require("cid.legacy"),require("ads.legacy"),require("facebook.legacy"),require("aaa-module-mounting.legacy");
}, {"ads.legacy":"ads.legacy","cid.legacy":"cid.legacy","facebook.legacy":"facebook.legacy","aaa-module-mounting.legacy":"aaa-module-mounting.legacy"}];
window.modules["facebook.legacy"] = [function(require,module,exports){"use strict";DS.service("facebook",[function(){this.fb=function(i){window.FB&&window.FB[i].apply(this,Array.prototype.slice.call(arguments,1))}}]);
}, {}];
require=(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o typeof key === 'string' && key.match(/\.legacy$/)).forEach(key => window.require(key));
}
function tryToMount(fn, el, name) {
try {
fn(el); // init the controller
} catch (e) {
const elementTag = el.outerHTML.slice(0, el.outerHTML.indexOf(el.innerHTML));
console.error(`Error initializing controller for "${name}" on "${elementTag}"`, e);
}
}
/**
* mount client.js component controllers
*/
function mountComponentModules() {
Object.keys(window.modules).filter(key => typeof key === 'string' && key.match(/\.client$/)).forEach(key => {
let controllerFn = window.require(key);
if (typeof controllerFn === 'function') {
const name = key.replace('.client', ''),
instancesSelector = `[data-uri*="_components/${name}/"]`,
defaultSelector = `[data-uri$="_components${name}"]`,
instances = document.querySelectorAll(instancesSelector),
defaults = document.querySelectorAll(defaultSelector);
for (let el of instances) {
tryToMount(controllerFn, el, name);
}
for (let el of defaults) {
tryToMount(controllerFn, el, name);
}
}
});
}
// Make sure that a `window.process.env.NODE_ENV` is available in the client for any dependencies,
// services, or components that could require it
// note: the `` value is swapped for the actual environment variable in /lib/cmd/compile/scripts.js
window.process = window.process || {};
window.process.env = window.process.env || {};
if (!window.process.env.NODE_ENV) {
window.process.env.NODE_ENV = '';
}
// note: legacy controllers that require legacy services (e.g. dollar-slice) must
// wait for DOMContentLoaded to initialize themselves, as the files themselves must be mounted first
mountLegacyServices();
mountComponentModules();
// ]]