Skip to content
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

Incorrect loading of component by paths #161

Closed
BEGEMOT9I opened this issue Mar 7, 2024 · 3 comments · Fixed by #162
Closed

Incorrect loading of component by paths #161

BEGEMOT9I opened this issue Mar 7, 2024 · 3 comments · Fixed by #162

Comments

@BEGEMOT9I
Copy link
Contributor

Hi! First of all, I would like to express my gratitude for creating such a project)

We are using this lib on a fairly large application and recently discovered two rather critical problems with preloading components.
The first of them is loading unnecessary components. If there is at least one link with routerLink directive and QuicklinkModule on the page, then the preloading process for the routing config is launched and, due to an erroneous determination of the appropriate path, unnecessary components are loaded.
The second problem is that the necessary components do not load. This is also due to the fact that the required paths are not matched correctly and they are skipped for preloading.
Both of these problems arise due to the download necessity check utility (to be more precise, due to findPath util), which has two bugs:

I've created a fork with an updated app so u can check a case when we don't load necessary chunks and load unnecessary (u should visit the /other-section and u will see that we are not loading a component for the /other-section/common-info path and loading script for the /other-section/:subSectionSlug/:pageSlug path)
https://github.com/BEGEMOT9I/ngx-quicklink

@mgechev
Copy link
Owner

mgechev commented Mar 11, 2024

Thanks for reporting these @BEGEMOT9I! Would you want to open a PR, I'll merge your changes and release?

@BEGEMOT9I
Copy link
Contributor Author

Yes, I'll try to do that ASAP

@BEGEMOT9I
Copy link
Contributor Author

@mgechev ready for review) Can you also look at my colleague's changes? #103

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants