The Snubs and Surprises of the 2025 Grammy Nominations
ByJustin Curto,
who covers music, TV, and celebrity for Vulture
Photo-Illustration: Vulture; Photos: WireImage (Joseph Okpako, Kevin Mazur), Dana Jacobs/FilmMagic
The Grammy nominations are here, with precisely zero regard for whether we can actually handle more controversial results of another vote. At least this one tilts a bit more progressive: The Recording Academy’s yearslong project to expand and diversify its membership seems to be paying off, with a younger and especially more women-heavy slate this year (just don’t look at the rock categories). As always, there are still head-scratchers, like big nominations for the Beatles and Jacob Collier. But there’s also plenty to celebrate, including Beyoncé’s massive haul and Charli XCX’s surprise showing. Before the Academy heads back to the ballot box, let’s review some snubs and surprises.
The Grammys (finally) think Beyoncé is country enough …
We’ve come a long way from 2017, when the Grammys booted “Daddy Lessons” from the country field. Beyoncé didn’t just earn her first country nomination for Cowboy Carter, she showed up across the board, in Best Country Solo Performance (for “16 Carriages”), Best Country Duo/Group Performance (for “II Most Wanted” with Miley Cyrus), Best Country Song (for “Texas Hold ’Em”), and Best Country Album. She even got a Best Americana Performance nod for “Ya Ya”! The Academy’s country voters have trended a touch more progressive than the Nashville institutions that continue to snub Bey, so this isn’t revolutionary. But such a widespread embrace is definitely a big win for her. And she didn’t even have to glad-hand Nashville record execs to get there.
… Right when R&B abandons her.
Beyoncé topped out with 11 nominations, a new record for her (and breaking her out of a tie with husband Jay-Z for the most Grammy nods ever, at 99). In addition to the country categories, she showed up in pop and rap, along with the generals. Her only miss was a surprise snub in Best R&B Song. The R&B field has always been generous to Beyoncé, even with her dance project, Renaissance. But maybe Cowboy Carter just didn’t have the right song; her submission, “Tyrant,” feels like a stretch, with a fiddle loop and a Dolly Parton feature.
The Academy really had a Brat summer.
Before today, Charli XCX had been nominated for just two Grammys, both for Iggy Azalea’s “Fancy.” So while I expected her breakthrough Brat to be represented, I had my reservations about just how much the Grammys would embrace her. Joke’s on me. Charli received seven nods, tied for second-most of the day, including Album, Record, and Song of the Year. But if you really want to see how much the Academy was bumpin’ that, look a little further downballot: “360” is up for Best Music Video, and A. G. Cook is up for Best Remixed Recording for “Von Dutch.” Brat even got a Best Recording Package nod for that viral cover. These nominations can be bellwethers of support across the Academy’s branches — and might forecast a Brat AOTY winter come February.
Chappell Roan and Sabrina Carpenter are neck and neck — but Carpenter might have the edge.
The two biggest pop breakouts of 2024 showed up everywhere they were expected: All of the big four categories, along with Best Pop Solo Performance and Best Pop Vocal Album. That gives us very little clarity as to who the Best New Artist front-runner is. But as of today, I’m picking Carpenter for two reasons. One, she was nominated for different songs in Record and Song of the Year — “Espresso” and “Please Please Please,” respectively — which could be a sign voters are a touch more interested in her music. And, two, Short n’ Sweet showed up in Best Engineered Album, which might earn her more respect among technical voters. But this race won’t be settled for months.
Jacob Collier is back, baby.
Of the bizarre 2021 Grammys slate, Jacob Collier’s AOTY nom for Djesse Vol. 3 seemed like the most shocking: Collier’s project had never even charted on the “Billboard 200.” Turns out, it wasn’t a fluke. Collier is up for the same award, with Djesse Vol. 4, the final installment in his cerebral series. He also earned a nod in the arrangement categories for the sixth straight year. Call him your favorite musician’s favorite musician.
The Grammys couldn’t resist the Beatles one last time.
Congratulations to the Beatles for their first Record of the Year nomination since 1971. It’s a send-off for “Now and Then,” the band’s allegedly final song — which John Lennon started to write in 1977 — with new audio-restoration technology. I had eyes on “Now and Then” sneaking in at Song of the Year, but Record of the Year might make more sense, given its technical achievement.
The sun rises again on André 3000.
How’s this for a return: Twenty-one years after winning Album of the Year for Outkast’s double-opus Speakerboxxx/The Love Below, André 3000 is back in the running with his jazz-flute album, New Blue Sun. The Academy never cooled on Three Stacks in the meantime — he picked up a few trophies last year for his feature on Killer Mike’s “Scientists & Engineers” — but it’s pretty impressive to see his embrace by a whole new wing of voters. (He’s also up for Best Alternative Jazz Album and Best Instrumental Composition.) Jazz voters recently flexing their muscles in the generals, with awards for Jon Batiste and Samara Joy, means André could have a decent chance at a second AOTY trophy.
The biggest hit of the year misses in Record of the Year.
Shaboozey’s runaway hit, “A Bar Song (Tipsy),” was somehow snubbed in Record of the Year, usually the category that most reflects the charts. Yet the track still got some general-category love in Song of the Year, a surprise to many who thought the Academy wouldn’t appreciate Shaboozey’s flip of J-Kwon’s rap hit “Tipsy.” (It’s more than deserved, as I previously noted — an interpolation like that takes the ear of a good songwriter!) That tops off a great day for Shaboozey — who also earned requisite nods in Best New Artist and the country field, plus a Best Melodic Rap Performance nod alongside Beyoncé and Linda Martell for “Spaghettii” — and for Jerrel Jones, a.k.a. J-Kwon, who earns his first two Grammy nominations as well.
Benson Boone is the odd one out.
With Shaboozey earning a hearty showing for “A Bar Song (Tipsy),” there was just no room for a fourth new artist to crack the top categories. That hurt Benson Boone, who earned only one nomination, in Best New Artist, despite having one of the most-streamed songs of the year.
Raye is a double threat.
Earlier this year, the Academy changed the criteria for Songwriter of the Year to make the award more open to artists who also write songs for other artists. No one benefited from that more than Raye, who earned nods in both Best New Artist and Songwriter of the Year. Her writing portfolio contains three of her own songs, along with the most random assortment of work you’ve ever seen: Beyoncé’s “Riiverdance,” Jennifer Lopez’s “Dear Ben, Pt II,” and a Rita Ora track.
Are the Grammys finally getting tired of Jack Antonoff?
He still earned five nominations, off his work with Taylor Swift and Sabrina Carpenter. But after five straight nominations — and three straight wins — in Producer of the Year, the Academy is finally making room for others in that category.
Taylor Swift falls short of a sweep.
At this point, Taylor Swift is a given in the Grammys’ top categories — and she cleaned up again, with nods in Album of the Year for The Tortured Poets Department and Record and Song of the Year for “Fortnight” with Post Malone. But down in the pop field, Swift actually underperformed. She missed in Best Pop Solo Performance for “I Can Do It With a Broken Heart,” which isn’t a total shock in such a competitive category. But “Fortnight” also missed in Best Pop Duo/Group Performance, which could be bad news for Swift’s Record and Song chances. She did still get a nod there for “us.” with Gracie Abrams, but what does it mean that voters chose that song over her own hit single?
Does the Academy love Megan Moroney or not?
Country singer-songwriter Megan Moroney was a highly tipped pick ahead of this year’s nominations, thanks to her viral song “Tennessee Orange” and follow-up album, Am I Okay? While she didn’t earn a single nomination, somehow two of her co-writers are up for Songwriter of the Year for songs they wrote with Moroney. If voters liked those songs so much, why didn’t they have any room for Moroney herself?
Rock is stale as ever.
Exactly zero of the acts up for Best Rock Performance, Best Rock Song, or Best Rock Album are first-time nominees. Yet again, rock voters are sticking to what they’re familiar with: Pearl Jam, Green Day, the Black Keys, St. Vincent, and, of course, the Beatles and the Stones. Congrats to the Black Crowes on their first nomination since 1991, I guess?
But metal finally catches up.
It’s rare to see a single woman in Best Metal Performance, which has been one of the most male-dominated Grammy categories in its 36-year history. But this year, for the first time ever, there are three: Marina Viotti (with Gojira and Victor Le Masne), Poppy (with Knocked Loose), and the woman-fronted Spiritbox. All of them stand a chance to win — as long as voters don’t give Metallica their eighth trophy instead.
Better late than never for Kim Gordon and Nick Cave.
More than 40 years into their careers, both indie-rock legends are finally seeing their music nominated for the first time — and with two apiece, in Best Alternative Music Performance and Album.
Women are finally taking over rap.
Everyone knows women have been running the decade in hip-hop so far. The Grammys have tacitly acknowledged this, nominating a woman rapper in Best New Artist for five straight years now (including this year’s deserved recognition for Doechii). But this year’s rap nominations finally made it obvious. At least one woman is nominated in every rap category, including three in the crowded Best Rap Performance, a majority in Best Melodic Rap Performance, and the first woman in Best Rap Album since 2018. There are still a few typical Grammy picks (congrats, Common & Pete Rock), but overall, the rap field hasn’t looked this fresh in years.
Genres are a funny little concept, aren’t they?
Just ask Linda Martell, a country-soul pioneer earning her first-ever Grammy nomination in Best Melodic Rap Performance.
The most competitive downballot category is Best Country Song.
A whopping three “Hot 100” No. 1s are competing here: “Texas Hold ’Em,” “A Bar Song (Tipsy),” and Post Malone and Morgan Wallen’s “I Had Some Help.” The other two slots go to past AOTY winner Kacey Musgraves’s “The Architect” and breakout Jelly Roll’s “I Am Not Okay.” The Academy didn’t even have room for its favorite country artist, Chris Stapleton!
The Academy has been reading Pitchfork.
Well, they didn’t nominate Jessica Pratt or Sufjan Stevens, but it was a quietly good day for indie singer-songwriters. Clairo capped off a breakthrough year with a nod for Best Alternative Music Album, while Waxahatchee earned her first career nod in Best Americana Album, and Adrianne Lenker added to her tally (solo and with Big Thief) with Best Folk Album.
The growing pains for African music continue.
After Tyla’s debut album was controversially moved from R&B to pop, the nominations did little to restore confidence in the Academy’s ability to handle African music. Rema and Tems are both (deservingly) nominated in Best Global Music Album, despite making overtures toward pop, R&B, and hip-hop — raising questions as to why Tyla couldn’t have been slotted there too. Tems even earned a nomination for Best R&B Song, showing that R&B voters are certainly open to recognizing African music. Meanwhile, the Best African Music Performance category is already being westernized, with Chris Brown up for “Sensational,” his foray into Afrobeats alongside Davido and Lojay.
Though Cave has previously been nominated for Best Music Film and Best Recording Package.
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()}});
}, {"1":1,"6":6,"12":12,"35":35,"40":40}];
window.modules["global-nav.client"] = [function(require,module,exports){"use strict";const dom=require(4),auth=require(12),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(1),appendLandingPageParams=require(135),pageUri=require(124).getPageUri(),subscriptionPromoLinks=dom.findAll(".persist-params"),searchString=window.location.search||"";function closeDropdowns(e){let n=globalNav.querySelectorAll(".dropdown.open");dropdownItems.forEach(function(t){let o=t.querySelector(".dropdown");!n||t.contains(e.target)&&27!==e.keyCode||o.classList.remove("open")})}function gtmSendReport(e,n,t){let o={eventCategory:"ecommerce",eventAction:"componentClick",brand:e,dimension23:"global-nav",list:pageUri,pageZone:"header",variant:"nav-link"};"global-nav-link"===t&&(o.eventLabel=n.href),gtm.reportNow(o)}function updateElementTargetUrlsIfQueryStrings(e){if(searchString){const n=new URLSearchParams(searchString);let t=e.href;if(t.includes("?")){const o=t.split("?"),i=new URLSearchParams(o[1]);for(let e of n.entries())i.set(e[0],e[1]);t=`${o[0]}?${i.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()&&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;
}, {"1":1,"4":4,"12":12,"124":124,"135":135}];
window.modules["aaa-module-mounting.legacy"] = [function(require,module,exports){"use strict";const _pickBy=require(221),_each=require(406),Fingerprint2=require(408),DS=require(407),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(406),_debounce=require(182),_sortBy=require(205),page=require(124),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,"124":124,"182":182,"205":205,"268":268,"274":274,"406":406,"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");
}, {"cid.legacy":"cid.legacy","ads.legacy":"ads.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();
// ]]