Created
May 13, 2022 20:24
-
-
Save twerske/3f5d95c08fea9e9ee07ad0e69cdd018f to your computer and use it in GitHub Desktop.
Tree-shakeable error messages
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component({...}) | |
class MyComponent {} | |
@Directive({...}) | |
class MyDirective extends MyComponent {} // throws an error at runtime | |
// Before v14 the error is a string: | |
> Directives cannot inherit Components. Directive MyDirective is attempting to extend component MyComponent. | |
// Since v14 the error code makes this tree-shakeable: | |
> NG0903: Directives cannot inherit Components. Directive MyDirective is attempting to extend component MyComponent. | |
// v14 production bundles preserve the error code, tree-shaking strings and making the bundle XX smaller: | |
> NG0903 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment