Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

All notable changes to this package will be documented in this file.

## [Unreleased]

### Changed
- Ported the webpack RSC plugin from the vendored built JavaScript artifact (`src/react-server-dom-webpack/cjs/react-server-dom-webpack-plugin.js`) to first-class TypeScript source at `src/webpack/RSCWebpackPlugin.ts`, preserving full behavior parity (server manifest emission, CSS/JS chunk scanning, runtime-chunk filtering, dependency-type chunk-group manifest construction with eager-import fallback, duplicate-package runtime detection, and hot-update CSS exclusion). The `./WebpackPlugin`, `./WebpackLoader`, and `./RSCReferenceDiscoveryPlugin` exports are unchanged; the vendored plugin file remains in the package but is no longer used by any export path. ([#87])

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 The changelog entry links to PR #75, but this work is being landed in PR #87. The reference and its footnote definition should both use #87 so the link points to the right pull request.

Suggested change
- Ported the webpack RSC plugin from the vendored built JavaScript artifact (`src/react-server-dom-webpack/cjs/react-server-dom-webpack-plugin.js`) to first-class TypeScript source at `src/webpack/RSCWebpackPlugin.ts`, preserving full behavior parity (server manifest emission, CSS/JS chunk scanning, runtime-chunk filtering, dependency-type chunk-group manifest construction with eager-import fallback, duplicate-package runtime detection, and hot-update CSS exclusion). The `./WebpackPlugin`, `./WebpackLoader`, and `./RSCReferenceDiscoveryPlugin` exports are unchanged; the vendored plugin file remains in the package but is no longer used by any export path. ([#87])
- Ported the webpack RSC plugin from the vendored built JavaScript artifact (`src/react-server-dom-webpack/cjs/react-server-dom-webpack-plugin.js`) to first-class TypeScript source at `src/webpack/RSCWebpackPlugin.ts`, preserving full behavior parity (server manifest emission, CSS/JS chunk scanning, runtime-chunk filtering, dependency-type chunk-group manifest construction with eager-import fallback, duplicate-package runtime detection, and hot-update CSS exclusion). The `./WebpackPlugin`, `./WebpackLoader`, and `./RSCReferenceDiscoveryPlugin` exports are unchanged; the vendored plugin file remains in the package but is no longer used by any export path. ([#87])


## [19.0.5-rc.7] - 2026-06-09

### Added
Expand Down Expand Up @@ -80,3 +85,4 @@ All notable changes to this package will be documented in this file.
[19.0.5-rc.1]: https://github.com/shakacode/react_on_rails_rsc/releases/tag/19.0.5-rc.1

[#52]: https://github.com/shakacode/react_on_rails_rsc/pull/52
[#87]: https://github.com/shakacode/react_on_rails_rsc/pull/87

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 The footnote definition for the PR link also needs to be updated to match.

Suggested change
[#87]: https://github.com/shakacode/react_on_rails_rsc/pull/87
[#87]: https://github.com/shakacode/react_on_rails_rsc/pull/87

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
"prepublishOnly": "yarn run build",
"release": "bash scripts/release.sh",
"release:dry-run": "bash scripts/release.sh --dry-run",
"build-if-needed": "test -f dist/client.browser.js -a -f dist/client.node.js -a -f dist/server.node.js -a -f dist/RSCReferenceDiscoveryPlugin.js -a -f dist/RSCReferenceDiscoveryPlugin.d.ts -a -f dist/react-server-dom-rspack/plugin.js -a -f dist/react-server-dom-rspack/loader.js || (yarn run build && test -f dist/client.browser.js -a -f dist/client.node.js -a -f dist/server.node.js -a -f dist/RSCReferenceDiscoveryPlugin.js -a -f dist/RSCReferenceDiscoveryPlugin.d.ts -a -f dist/react-server-dom-rspack/plugin.js -a -f dist/react-server-dom-rspack/loader.js)",
"build-if-needed": "test -f dist/client.browser.js -a -f dist/client.node.js -a -f dist/server.node.js -a -f dist/RSCReferenceDiscoveryPlugin.js -a -f dist/RSCReferenceDiscoveryPlugin.d.ts -a -f dist/react-server-dom-rspack/plugin.js -a -f dist/react-server-dom-rspack/loader.js -a -f dist/webpack/RSCWebpackPlugin.js || (yarn run build && test -f dist/client.browser.js -a -f dist/client.node.js -a -f dist/server.node.js -a -f dist/RSCReferenceDiscoveryPlugin.js -a -f dist/RSCReferenceDiscoveryPlugin.d.ts -a -f dist/react-server-dom-rspack/plugin.js -a -f dist/react-server-dom-rspack/loader.js -a -f dist/webpack/RSCWebpackPlugin.js)",
"prepack": "yarn run build-if-needed",
"prepare": "yarn run build-if-needed"
},
Expand Down
14 changes: 3 additions & 11 deletions src/WebpackPlugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,7 @@ import {
DEFAULT_CLIENT_REFERENCES_EXCLUDE,
DEFAULT_CLIENT_REFERENCES_INCLUDE,
} from "./clientReferences";
import RSCWebpackPluginLib = require("./react-server-dom-webpack/plugin");

type ReactFlightWebpackPlugin = {
apply(compiler: Compiler): void;
};

type ReactFlightWebpackPluginConstructor = {
new (options: unknown): ReactFlightWebpackPlugin;
};
import { RSCWebpackPlugin as RSCFlightWebpackPlugin } from "./webpack/RSCWebpackPlugin";

type ClientReferenceSearchPath = {
directory: string,
Expand All @@ -31,7 +23,7 @@ export type Options = {
};

export class RSCWebpackPlugin {
private plugin: ReactFlightWebpackPlugin;
private plugin: RSCFlightWebpackPlugin;

constructor(options: Options) {
const normalizedOptions =
Expand All @@ -48,7 +40,7 @@ export class RSCWebpackPlugin {
],
}
: options;
this.plugin = new (RSCWebpackPluginLib as ReactFlightWebpackPluginConstructor)(normalizedOptions);
this.plugin = new RSCFlightWebpackPlugin(normalizedOptions);
}

apply(compiler: Compiler) {
Expand Down
Loading
Loading