analogjs / analog

The fullstack meta-framework for Angular. Powered by Vite and Nitro
https://analogjs.org
MIT License
2.41k stars 225 forks source link

Importing `injectContent` in root causes the dev server to hang? #1133

Open alexciesielski opened 1 month ago

alexciesielski commented 1 month ago

Please provide the environment you discovered this bug in.

1.4.0

I tried to reproduce it using the StackBlitz but it doesn't start ... But simply use npm create analog@latest and use the blog starter

Which area/package is the issue in?

content

Description

In a clean project

  1. import and call injectContent() from @analogjs/content
  2. run the app
  3. open app at the provided URL
  4. the site never loads

Please provide the exception or error you saw

No exceptions, no warnings, no errors :(

Other information

I tried this both with the nx preset and the regular npm create method

I would be willing to submit a PR to fix this issue

alexciesielski commented 1 month ago

More context in this Discord thread https://discord.com/channels/994618831987290112/1245693312849940521

alexciesielski commented 1 month ago

The function call seems to work down below in the [slug].page.ts though so it seems that there is an issue with calling it in the root component... 🤔