Skip to content

[FSSDK-12453] server bundle addition#328

Open
junaed-optimizely wants to merge 1 commit intomasterfrom
junaed/fssdk-12453-server-bundle
Open

[FSSDK-12453] server bundle addition#328
junaed-optimizely wants to merge 1 commit intomasterfrom
junaed/fssdk-12453-server-bundle

Conversation

@junaed-optimizely
Copy link
Copy Markdown
Collaborator

Summary

Server bundle addition for RSC support

Test plan

Manually tested in server ENV

Issues

  • FSSDK-12453

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a dedicated server-safe entrypoint and build output so @optimizely/react-sdk can be imported from React Server Components (RSC) without pulling in client-only React APIs.

Changes:

  • Introduces src/server.ts as a server-safe entrypoint re-exporting client creation, logging, helpers, and types.
  • Updates Rollup config to emit an additional server-focused ESM bundle (dist/server.es.min.mjs).
  • Adds a react-server conditional export in package.json to route RSC environments to the server bundle + types.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
src/server.ts New server-safe public entrypoint exposing non-React-API surface for RSC usage.
rollup.config.mjs Builds an additional minified ESM output for the new server entry.
package.json Adds react-server conditional export pointing to the new server bundle and types.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants