Skip to content

Conversation

alan-agius4
Copy link
Collaborator

This commit activates ssr in the Vite when prerendering is disabled internally.

Closes #28523

@alan-agius4 alan-agius4 requested a review from clydin September 30, 2024 07:52
@alan-agius4 alan-agius4 added action: review The PR is still awaiting reviews from at least one requested reviewer target: major This PR is targeted for the next major release labels Sep 30, 2024
This commit enables server-side rendering (SSR) in Vite when prerendering is turned off. It also imports `@angular/compiler` in the SSR middleware to resolve the following issue:

```
[vite] Internal server error: The injectable 'PlatformNavigation' needs to be compiled using the JIT compiler, but '@angular/compiler' is not available.

The injectable is part of a library that has been partially compiled. However, the Angular Linker has not processed the library to utilize JIT compilation as a fallback.

Ideally, the library should be processed with the Angular Linker for complete AOT compilation.
```

Closes angular#28523
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Oct 2, 2024
@alan-agius4 alan-agius4 merged commit c33e862 into angular:main Oct 2, 2024
29 checks passed
@alan-agius4 alan-agius4 deleted the vite-ssr-ssg branch October 2, 2024 13:08
@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 Nov 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker area: @angular/build target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Internal server error: The injectable 'PlatformNavigation' needs to be compiled using the JIT compiler with 19.0.0-next.8
2 participants