angular / angular/angular-cli

Report a warning/error when multiple instance of `@angular/core` are bundled.

Open
#26,774 0 comments 2 reactions 0 assignees View on GitHub
area: @angular-devkit/build-angular feature feature: under consideration
Dominant language
TypeScript
Stars
27k
Forks
11.8k
Avg merge
14h 23m
Merged PRs (30d)
162

Description

### Command

build

### Description

When the CLI bundles Angular apps it can happen that multiple instances of `@angular/core` are bundled.

This leads to a variety of errors at runtime that are difficult to diagnose for developers.

Currently on the FW repo we point users toward : angular/angular#35586

### Describe the solution you'd like

I'd be great if the CLI could throw a warning/error when it happens so users are aware even before runtime that there is an issue with their bundle and they should have a look at their dependency resolution !

Contributor guide

Open the contributing guide

Research direction

Start with the CLI's build command and investigate how dependency resolution and bundled Angular applications are represented during the build. Review angular/angular#35586 for the reported multiple-@angular/core failure mode. Done means the build reports a warning or error when multiple instances are bundled, before the runtime failure.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, typescript
Domain
build-system, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.