Skip to content

Commit 7f67dbc

Browse files
alan-agius4dgp1130
authored andcommitted
fix(@angular-devkit/build-angular): invalid browsers version ranges
This change addresses the `Invalid version: "15.2-15.3"` range error. We previously only handled version ranges for `ios_safari`. Now, we handle such versions for all browsers. Closes #22606
1 parent ecf5cff commit 7f67dbc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/angular_devkit/build_angular/src/webpack/plugins/css-optimizer-plugin.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -159,11 +159,12 @@ export class CssOptimizerPlugin {
159159
// browserslist uses the name `ios_saf` for iOS Safari whereas esbuild uses `ios`
160160
if (browserName === 'ios_saf') {
161161
browserName = 'ios';
162-
// browserslist also uses ranges for iOS Safari versions but only the lowest is required
163-
// to perform minimum supported feature checks. esbuild also expects a single version.
164-
[version] = version.split('-');
165162
}
166163

164+
// browserslist uses ranges `15.2-15.3` versions but only the lowest is required
165+
// to perform minimum supported feature checks. esbuild also expects a single version.
166+
[version] = version.split('-');
167+
167168
if (esBuildSupportedBrowsers.has(browserName)) {
168169
if (browserName === 'safari' && version === 'TP') {
169170
// esbuild only supports numeric versions so `TP` is converted to a high number (999) since

0 commit comments

Comments
 (0)