mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-21 14:02:43 +08:00
The `esModuleInterop` TypeScript option is a TypeScript recommended option that ensures that TypeScript emits compliant ESM code when transforming namespace and default imports. This is important for new projects because they now use the `application` builder which emits full ESM code. Not using this option with certain third-party packages (e.g., `moment`) can result in build warnings and the potential for runtime failure. For existing applications that are considering migrating, information pertaining to this situation will be available within the documentation. Since the `allowSyntheticDefaultImports` is implied and automatically enabled when `esModuleInterop` is enabled, the previous option has been replaced with this one. Reference: https://www.typescriptlang.org/tsconfig#esModuleInterop