镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ function getEsBuildCommonPolyfillsOptions(
tryToResolvePolyfillsAsRelative: boolean,
loadResultCache: LoadResultCache | undefined,
): BuildOptions | undefined {
const { jit, workspaceRoot, i18nOptions } = options;
const { jit, workspaceRoot, i18nOptions, externalPackages } = options;

const buildOptions = getEsBuildCommonOptions(options);
buildOptions.splitting = false;
Expand All @@ -671,8 +671,10 @@ function getEsBuildCommonPolyfillsOptions(
// Locale data should go first so that project provided polyfill code can augment if needed.
let needLocaleDataPlugin = false;
if (i18nOptions.shouldInline) {
// Remove localize polyfill as this is not needed for build time i18n.
polyfills = polyfills.filter((path) => !path.startsWith('@angular/localize'));
if (!externalPackages) {
// Remove localize polyfill when i18n inline transformation have been applied to all the packages.
polyfills = polyfills.filter((path) => !path.startsWith('@angular/localize'));
}

// Add locale data for all active locales
// TODO: Inject each individually within the inlining process itself
Expand Down
Loading