Description
Bug Report or Feature Request (mark with an x
)
- [x] bug report -> please search issues before submitting
- [ ] feature request
Versions.
@angular/cli: 1.4.6
node: 8.5.0
os: darwin x64
@angular/animations: 4.4.4
@angular/common: 4.4.4
@angular/compiler: 4.4.4
@angular/core: 4.4.4
@angular/forms: 4.4.4
@angular/http: 4.4.4
@angular/platform-browser: 4.4.4
@angular/platform-browser-dynamic: 4.4.4
@angular/router: 4.4.4
@angular/cli: 1.4.6
@angular/compiler-cli: 4.4.4
@angular/language-service: 4.4.4
typescript: 2.3.4
Repro steps.
Create new application and add second application to apps array in angular-cli.json.
Add another main entry that shares components with default main.ts file.
Running ng build or serve with --aot flag produces build error.
The log given by the failure.
ERROR in Error: Type AppComponent in app.component.ts is part of the declarations of 2 modules
Desired functionality.
Using different apps with shared components would resolve excluding mocks from production code and add additional features for each app.
Mention any other details that might be useful.
Example repo: https://github.com/veke/ng-multiple-apps
ng build --aot