I have implemented lazy-loading in my Angular Application (using CLI 7.3.4)

Its compiling successfully but when I route to a lazy-loaded module (say module1 path), its loading one more chunk which is actually other lazy loaded module (Module2) path.

Chunk Name: "http://localhost:4200/default~lazy-load-modules-module1-module1-module~lazy-load-modules-module2-mo~be6d77c5.js"

I am unable to understand why this default ~ is getting generated.

I have tried searching in my entire workspace if the module is mistakenly invoked anywhere using router.navigate, but I found none.

I am expecting to load modules only when one of its component is invoked.

0 Answers