Commit e244c45
committed
feat(@angular/build): support custom resolution conditions with applications
When using the application build system, a new `conditions` option is now
available that allows adding custom package resolution conditions that
can adjust the resolution for conditional exports and imports.
By default the `module` and `production`/`development` conditions will be
present with the later dependent on the `optimization` option. If any
custom conditions value is present including an empty array, none of these
defaults will be present and must be manually included if needed.
The following special conditions will always be present if their respective
requirements are satisfied:
* es2015 (required by rxjs)
* es2020 (APF backwards compatibility)
* default
* import
* require
* node
* browser
For additional information regarding conditional exports/imports:
https://nodejs.org/api/packages.html#conditional-exports
https://nodejs.org/api/packages.html#subpath-imports1 parent a9aa317 commit e244c45
File tree
4 files changed
+27
-6
lines changed- goldens/public-api/angular/build
- packages/angular/build/src
- builders/application
- tools/esbuild
4 files changed
+27
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
31 | 32 | | |
32 | 33 | | |
33 | 34 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
496 | 496 | | |
497 | 497 | | |
498 | 498 | | |
| 499 | + | |
499 | 500 | | |
500 | 501 | | |
501 | 502 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
293 | 293 | | |
294 | 294 | | |
295 | 295 | | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
296 | 303 | | |
297 | 304 | | |
298 | 305 | | |
| |||
Lines changed: 18 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
546 | 546 | | |
547 | 547 | | |
548 | 548 | | |
| 549 | + | |
549 | 550 | | |
550 | 551 | | |
551 | 552 | | |
| |||
563 | 564 | | |
564 | 565 | | |
565 | 566 | | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
566 | 583 | | |
567 | 584 | | |
568 | 585 | | |
569 | 586 | | |
570 | 587 | | |
571 | 588 | | |
572 | | - | |
573 | | - | |
574 | | - | |
575 | | - | |
576 | | - | |
577 | | - | |
| 589 | + | |
578 | 590 | | |
579 | 591 | | |
580 | 592 | | |
| |||
0 commit comments