Skip to content

Importing/referencing NgbAnything inside LazyModule breaks tree shaking #13635

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
aitboudad opened this issue Feb 8, 2019 · 4 comments
Closed

Comments

@aitboudad
Copy link
Contributor

aitboudad commented Feb 8, 2019

🐞 Bug report

Command (mark with an x)

- [x] build

Is this a regression?

No

Description

Hi, I've noticed that some packages (ng-bootstrap) which provide fesm5 as a default package module doesn't take advantage of build optimizer, importing a submodule will include the whole library

🔬 Minimal Reproduction

see ng-bootstrap/ng-bootstrap#2883

@aitboudad
Copy link
Contributor Author

this occurs only if the concerned module is declared in a lazy module, in that case using esm5 produce a better result.

@filipesilva
Copy link
Contributor

I think I know what's going on. But I'll actually comment on ng-bootstrap/ng-bootstrap#2883 instead, as people have been looking into the issue there already.

filipesilva added a commit to filipesilva/angular-cli that referenced this issue Feb 11, 2019
filipesilva added a commit to filipesilva/angular-cli that referenced this issue Feb 12, 2019
@filipesilva filipesilva changed the title [Build optimizer] fesm5 build breaks tree shaking Importing/referencing NgbAnything inside LazyModule breaks tree shaking Apr 9, 2019
@ngbot ngbot bot removed this from the Backlog milestone Jan 25, 2022
@alan-agius4 alan-agius4 added 2022Q3 Fixit Candidates for the Q3 2022 fix-it and removed triage #1 labels Jun 24, 2022
@alan-agius4
Copy link
Collaborator

Closing as this is expected and is also documented in https://angular.io/guide/angular-package-format#entrypoints-and-code-splitting

@alan-agius4 alan-agius4 closed this as not planned Won't fix, can't repro, duplicate, stale Jun 29, 2022
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Jul 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants