Skip to content

Commit 9e7c47b

Browse files
demurgosdgp1130
authored andcommitted
fix(@angular-devkit/build-angular): allow mts and cts file replacement
Updates the `fileReplacement` pattern to allow `.mts` and `.cts` files. This enables support for TypeScript files with explicit ESM support. Closes #27124 (cherry picked from commit fa146b8)
1 parent 644010d commit 9e7c47b

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

packages/angular_devkit/build_angular/src/builders/application/schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -572,11 +572,11 @@
572572
"properties": {
573573
"replace": {
574574
"type": "string",
575-
"pattern": "\\.(([cm]?j|t)sx?|json)$"
575+
"pattern": "\\.(([cm]?[jt])sx?|json)$"
576576
},
577577
"with": {
578578
"type": "string",
579-
"pattern": "\\.(([cm]?j|t)sx?|json)$"
579+
"pattern": "\\.(([cm]?[jt])sx?|json)$"
580580
}
581581
},
582582
"additionalProperties": false,

packages/angular_devkit/build_angular/src/builders/browser-esbuild/schema.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,11 +483,11 @@
483483
"properties": {
484484
"replace": {
485485
"type": "string",
486-
"pattern": "\\.(([cm]?j|t)sx?|json)$"
486+
"pattern": "\\.(([cm]?[jt])sx?|json)$"
487487
},
488488
"with": {
489489
"type": "string",
490-
"pattern": "\\.(([cm]?j|t)sx?|json)$"
490+
"pattern": "\\.(([cm]?[jt])sx?|json)$"
491491
}
492492
},
493493
"additionalProperties": false,

packages/angular_devkit/build_angular/src/builders/browser/schema.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -473,11 +473,11 @@
473473
"properties": {
474474
"src": {
475475
"type": "string",
476-
"pattern": "\\.(([cm]?j|t)sx?|json)$"
476+
"pattern": "\\.(([cm]?[jt])sx?|json)$"
477477
},
478478
"replaceWith": {
479479
"type": "string",
480-
"pattern": "\\.(([cm]?j|t)sx?|json)$"
480+
"pattern": "\\.(([cm]?[jt])sx?|json)$"
481481
}
482482
},
483483
"additionalProperties": false,
@@ -488,11 +488,11 @@
488488
"properties": {
489489
"replace": {
490490
"type": "string",
491-
"pattern": "\\.(([cm]?j|t)sx?|json)$"
491+
"pattern": "\\.(([cm]?[jt])sx?|json)$"
492492
},
493493
"with": {
494494
"type": "string",
495-
"pattern": "\\.(([cm]?j|t)sx?|json)$"
495+
"pattern": "\\.(([cm]?[jt])sx?|json)$"
496496
}
497497
},
498498
"additionalProperties": false,

packages/angular_devkit/build_angular/src/builders/server/schema.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -270,11 +270,11 @@
270270
"properties": {
271271
"src": {
272272
"type": "string",
273-
"pattern": "\\.(([cm]?j|t)sx?|json)$"
273+
"pattern": "\\.(([cm]?[jt])sx?|json)$"
274274
},
275275
"replaceWith": {
276276
"type": "string",
277-
"pattern": "\\.(([cm]?j|t)sx?|json)$"
277+
"pattern": "\\.(([cm]?[jt])sx?|json)$"
278278
}
279279
},
280280
"additionalProperties": false,
@@ -285,11 +285,11 @@
285285
"properties": {
286286
"replace": {
287287
"type": "string",
288-
"pattern": "\\.(([cm]?j|t)sx?|json)$"
288+
"pattern": "\\.(([cm]?[jt])sx?|json)$"
289289
},
290290
"with": {
291291
"type": "string",
292-
"pattern": "\\.(([cm]?j|t)sx?|json)$"
292+
"pattern": "\\.(([cm]?[jt])sx?|json)$"
293293
}
294294
},
295295
"additionalProperties": false,

0 commit comments

Comments
 (0)