angular-cli: Route extraction shouldnt load the whole app in dev server

I dont want to be that type of guy that just reopens a issue. But i only saw @alan-agius4 answers on that topic and i would kindly ask other angular engineers about their opinion and if its something that can be solved differently. Maybe without @alan-agius4 indirect implication that it would “only” be solveable with file based routing.

There are no docs on route extraction, but my understanding now is that all routes are computed in advance. I’m not deeper into angular code than the public_api, but I can’t imagine that a full application load (full lifecycle or template execution) are necessary to figure this out. What does this have to do with route extraction?

proof of concept In this example, it would only make sense for SSG if the REQUEST token is not available on the server. (but according to @alan-agius4 its “bad practice” to think that the REQUEST token is available on the server with disabled prerender) - Just think about that for a second.

Sorry if I’m a bit salty, but it took me a really long time to figure out that (imo this bug) is due to the angular dev server.

Related to: https://github.com/angular/angular-cli/issues/28995 https://github.com/angular/angular-cli/issues/28727#issuecomment-2441443287 https://github.com/angular/angular-cli/issues/29084 (my previous ticket) Angular Discord - My thread Angular Discord - Another thread and probably many more

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 16

Commits related to this issue

Most upvoted comments

So you could theoretically disable component bootstrapping for route extraction in the dev server, but enable it again later during the actual build? That would be a really nice change

Yes