@@ -723,10 +723,16 @@ export function resolveConfiguredModelRef(
723723 const manifestPluginContext = createModelManifestPluginContext ( params ) ;
724724 const profileStripped = Boolean ( modelWithoutProfile && modelWithoutProfile !== trimmed ) ;
725725 const exactAliasCandidate = findModelAliasCandidate ( params . cfg , trimmed ) ;
726- if ( profileStripped && exactAliasCandidate ) {
726+ const strippedAliasCandidate = profileStripped
727+ ? findModelAliasCandidate ( params . cfg , modelWithoutProfile )
728+ : undefined ;
729+ const profileAliasCandidate = profileStripped
730+ ? ( exactAliasCandidate ?? strippedAliasCandidate )
731+ : undefined ;
732+ if ( profileAliasCandidate ) {
727733 const aliasRef = parseModelRefWithCompatAlias ( {
728734 cfg : params . cfg ,
729- raw : exactAliasCandidate . keyRaw ,
735+ raw : profileAliasCandidate . keyRaw ,
730736 defaultProvider : params . defaultProvider ,
731737 allowManifestNormalization : params . allowManifestNormalization ,
732738 allowPluginNormalization : params . allowPluginNormalization ,
@@ -747,10 +753,7 @@ export function resolveConfiguredModelRef(
747753 manifestPlugins : manifestPluginContext . get ( ) ,
748754 } ) ;
749755 }
750- const strippedAliasCandidate = profileStripped
751- ? findModelAliasCandidate ( params . cfg , modelWithoutProfile )
752- : undefined ;
753- const aliasCandidate = exactAliasCandidate ?? strippedAliasCandidate ;
756+ const aliasCandidate = profileStripped ? undefined : exactAliasCandidate ;
754757 const manifestPlugins = manifestPluginContext . peek ( ) ;
755758 if (
756759 aliasCandidate &&
0 commit comments