Skip to content

fix(@angular-devkit/build-angular): ignore supported browsers during i18n extraction #23421

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 23, 2022
Merged
Show file tree
Hide file tree
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 @@ -125,7 +125,7 @@ export default custom<ApplicationPresetOptions>(() => {
customOptions.forcePresetEnv = true;
// Comparable behavior to tsconfig target of ES5
customOptions.supportedBrowsers = ['IE 9'];
} else if (isJsFile) {
} else if (isJsFile && customOptions.supportedBrowsers?.length) {
// Applications code ES version can be controlled using TypeScript's `target` option.
// However, this doesn't effect libraries and hence we use preset-env to downlevel ES fetaures
// based on the supported browsers in browserlist.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ export async function execute(

return partials;
},
// During extraction we don't need specific browser support.
{ supportedBrowsers: undefined },
);

// All the localize usages are setup to first try the ESM entry point then fallback to the deep imports.
Expand Down