Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds Bun support with a minimum version of Bun v1.1.45.
The most prominent change is the compatibility fallback workaround on how streams are being used with the SSR worker. Node.js supports passing streams to a worker, while Bun doesn't and it was necessary to pass buffers directly instead of using a stream.
Adds workaround to switch
NODE_ENV
to production when using@lazarv/react-server
in production mode as React needs to resolve to the appropriate module in production.A Bun plugin was implemented to resolve the
react
andreact/jsx-dev-runtime
modules to theirreact-server
versions in development mode.Using
fsevents
in file watchers is disabled when using Bun, while the server restart option is disabled in the development server when using Bun as there's a known issue with Vite restarting the server.Fixes how the logger instance is initiated in production mode.
Updates the "Get Started" page in the documentation to include instructions on how to use Bun when working with
@lazarv/react-server
and also includes a minor tweak on the styling of the documentation sidebar navigation.