Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix SSR Node bundle usage in docs #4076

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

xettri
Copy link
Contributor

@xettri xettri commented Nov 27, 2024

Summary

Fixes incorrect usage of ssr environment in the documentation. Updated to use the correct node bundle for SSR rendering. In this PR used same environment in doc which used in Create SSR configuration.

Related Links

https://rsbuild.dev/guide/advanced/ssr#custom-server

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@CLAassistant
Copy link

CLAassistant commented Nov 27, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

netlify bot commented Nov 27, 2024

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit fd8fcf1
🔍 Latest deploy log https://app.netlify.com/sites/rsbuild/deploys/6746f7276e43e00007f10e84
😎 Deploy Preview https://deploy-preview-4076--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 71 (🟢 up 2 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify site configuration.

// Load SSR bundle
const indexModule = await serverAPI.environments.ssr.loadBundle('index');
// Load Node bundle for SSR
const indexModule = await serverAPI.environments.node.loadBundle('index');
Copy link
Member

Choose a reason for hiding this comment

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

I prefer to use environments.node instead of environments.ssr. @9aoy what do you think?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Prefer environments.node. I will check other places where environments.ssr is used and correct it

@9aoy 9aoy merged commit 9b3f824 into web-infra-dev:main Nov 28, 2024
13 checks passed
@chenjiahan chenjiahan changed the title [doc] Fix SSR Node Bundle Usage in Docs docs: fix SSR Node bundle usage in docs Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants