diff --git a/packages/builder/builder-shared/src/plugins/HtmlPreloadOrPrefetchPlugin/index.ts b/packages/builder/builder-shared/src/plugins/HtmlPreloadOrPrefetchPlugin/index.ts index 1b193b403f6e..046dfaa2f7da 100644 --- a/packages/builder/builder-shared/src/plugins/HtmlPreloadOrPrefetchPlugin/index.ts +++ b/packages/builder/builder-shared/src/plugins/HtmlPreloadOrPrefetchPlugin/index.ts @@ -145,7 +145,8 @@ function generateLinks( crossOriginLoading && !(crossOriginLoading !== 'use-credentials' && publicPath === '/') ) { - attributes.crossorigin = crossOriginLoading; + attributes.crossorigin = + crossOriginLoading === 'anonymous' ? '' : crossOriginLoading; } } }