Skip to content

Conversation

alan-agius4
Copy link
Collaborator

@alan-agius4 alan-agius4 commented Oct 8, 2024

This commit introduces a new option called experimentalPlatform to the Angular SSR configuration.

The experimentalPlatform option allows developers to specify the target platform for the server bundle, enabling the generation of platform-neutral bundles suitable for deployment in environments like edge workers and other serverless platforms that do not rely on Node.js APIs.

This change enhances the portability of Angular SSR applications and expands their deployment possibilities.

Note: that this feature does not include polyfills for Node.js modules and is experimental, subject to future changes.

@alan-agius4 alan-agius4 changed the title feat(@angular/ssr): add experimentalNodeless option for SSR builds feat(@angular/build): add experimentalNodeless option for SSR builds Oct 8, 2024
@angular-robot angular-robot bot added detected: feature PR contains a feature commit area: @angular/ssr labels Oct 8, 2024
@alan-agius4 alan-agius4 changed the title feat(@angular/build): add experimentalNodeless option for SSR builds feat(@angular/build): introduce ssr.experimentalPlatform option Oct 9, 2024
@alan-agius4 alan-agius4 force-pushed the nodeless branch 2 times, most recently from 98f3392 to bf03e80 Compare October 9, 2024 07:15
@alan-agius4 alan-agius4 added target: major This PR is targeted for the next major release and removed area: @angular/ssr labels Oct 9, 2024
@alan-agius4 alan-agius4 force-pushed the nodeless branch 3 times, most recently from f746b82 to 4f8723a Compare October 9, 2024 09:47
@alan-agius4 alan-agius4 requested review from clydin and dgp1130 October 9, 2024 09:48
@alan-agius4 alan-agius4 added the action: review The PR is still awaiting reviews from at least one requested reviewer label Oct 9, 2024
@alan-agius4 alan-agius4 marked this pull request as ready for review October 9, 2024 09:48
@alan-agius4
Copy link
Collaborator Author

Note: The test failure occurs due to the current test structure relying on #28571. Once that PR is merged, the test will pass successfully.

const port = await findFreePort();
await execAndWaitForOutputToMatch(
'npx',
['-y', 'listhen', './dist/test-project/server/server.mjs', `--port=${port}`],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: Should listhen be in our devDependencies? That way our bazel test doesn't need network access to download it dynamically and pin the dependency insulate us from breaking changes.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since it’s used only in a single test I preferred to use npx. I can add a version specifier though.

This commit introduces a new option called `experimentalPlatform` to the Angular SSR configuration.

The `experimentalPlatform` option allows developers to specify the target platform for the server bundle, enabling the generation of platform-neutral bundles suitable for deployment in environments like edge workers and other serverless platforms that do not rely on Node.js APIs.

This change enhances the portability of Angular SSR applications and expands their deployment possibilities.

**Note:** that this feature does not include polyfills for Node.js modules and is experimental, subject to future changes.
@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 9, 2024
@alan-agius4 alan-agius4 merged commit 7d883a1 into angular:main Oct 9, 2024
30 checks passed
@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 9, 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 detected: feature PR contains a feature commit target: major This PR is targeted for the next major release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants