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

[Flight] Enable Server Action Source Maps in flight-esm Fixture #30763

Merged
merged 6 commits into from
Aug 22, 2024

Conversation

sebmarkbage
Copy link
Collaborator

Stacked on #30758 and #30755.

This is copy paste from #30755 into the ESM package. We use the webpack-sources package for the source map utility but it's not actually dependent on Webpack itself. Could probably inline it in the build.

@sebmarkbage sebmarkbage requested review from gnoff and eps1lon August 20, 2024 22:26
Copy link

vercel bot commented Aug 20, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
react-compiler-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 20, 2024 10:36pm

@react-sizebot
Copy link

react-sizebot commented Aug 20, 2024

Comparing: e831c23...a761c41

Critical size changes

Includes critical production bundles, as well as any change greater than 2%:

Name +/- Base Current +/- gzip Base gzip Current gzip
oss-stable/react-dom/cjs/react-dom.production.js = 6.68 kB 6.68 kB +0.05% 1.82 kB 1.82 kB
oss-stable/react-dom/cjs/react-dom-client.production.js = 500.37 kB 500.37 kB = 89.80 kB 89.80 kB
oss-experimental/react-dom/cjs/react-dom.production.js = 6.69 kB 6.69 kB +0.05% 1.83 kB 1.83 kB
oss-experimental/react-dom/cjs/react-dom-client.production.js = 507.50 kB 507.50 kB = 90.96 kB 90.96 kB
facebook-www/ReactDOM-prod.classic.js = 595.24 kB 595.24 kB = 105.55 kB 105.55 kB
facebook-www/ReactDOM-prod.modern.js = 571.54 kB 571.54 kB = 101.75 kB 101.75 kB
oss-experimental/react-server-dom-esm/esm/react-server-dom-esm-node-loader.production.js +60.72% 12.52 kB 20.13 kB +60.96% 3.09 kB 4.97 kB
oss-stable-rc/react-server-dom-esm/esm/react-server-dom-esm-node-loader.production.js +60.72% 12.52 kB 20.13 kB +60.96% 3.09 kB 4.97 kB
oss-stable-semver/react-server-dom-esm/esm/react-server-dom-esm-node-loader.production.js +60.72% 12.52 kB 20.13 kB +60.96% 3.09 kB 4.97 kB
oss-stable/react-server-dom-esm/esm/react-server-dom-esm-node-loader.production.js +60.72% 12.52 kB 20.13 kB +60.96% 3.09 kB 4.97 kB
oss-experimental/react-server-dom-webpack/esm/react-server-dom-webpack-node-loader.production.js +60.66% 12.53 kB 20.14 kB +60.72% 3.09 kB 4.97 kB
oss-stable-rc/react-server-dom-webpack/esm/react-server-dom-webpack-node-loader.production.js +60.66% 12.53 kB 20.14 kB +60.72% 3.09 kB 4.97 kB
oss-stable-semver/react-server-dom-webpack/esm/react-server-dom-webpack-node-loader.production.js +60.66% 12.53 kB 20.14 kB +60.72% 3.09 kB 4.97 kB
oss-stable/react-server-dom-webpack/esm/react-server-dom-webpack-node-loader.production.js +60.66% 12.53 kB 20.14 kB +60.72% 3.09 kB 4.97 kB

Significant size changes

Includes any change greater than 0.2%:

Expand to show
Name +/- Base Current +/- gzip Base gzip Current gzip
oss-experimental/react-server-dom-esm/esm/react-server-dom-esm-node-loader.production.js +60.72% 12.52 kB 20.13 kB +60.96% 3.09 kB 4.97 kB
oss-stable-rc/react-server-dom-esm/esm/react-server-dom-esm-node-loader.production.js +60.72% 12.52 kB 20.13 kB +60.96% 3.09 kB 4.97 kB
oss-stable-semver/react-server-dom-esm/esm/react-server-dom-esm-node-loader.production.js +60.72% 12.52 kB 20.13 kB +60.96% 3.09 kB 4.97 kB
oss-stable/react-server-dom-esm/esm/react-server-dom-esm-node-loader.production.js +60.72% 12.52 kB 20.13 kB +60.96% 3.09 kB 4.97 kB
oss-experimental/react-server-dom-webpack/esm/react-server-dom-webpack-node-loader.production.js +60.66% 12.53 kB 20.14 kB +60.72% 3.09 kB 4.97 kB
oss-stable-rc/react-server-dom-webpack/esm/react-server-dom-webpack-node-loader.production.js +60.66% 12.53 kB 20.14 kB +60.72% 3.09 kB 4.97 kB
oss-stable-semver/react-server-dom-webpack/esm/react-server-dom-webpack-node-loader.production.js +60.66% 12.53 kB 20.14 kB +60.72% 3.09 kB 4.97 kB
oss-stable/react-server-dom-webpack/esm/react-server-dom-webpack-node-loader.production.js +60.66% 12.53 kB 20.14 kB +60.72% 3.09 kB 4.97 kB

Generated by 🚫 dangerJS against 8a42e40

So we can use this to generate source maps that point to original code.
Which is a dependency of webpack which is already a peer.
This lets the generated server references point to the original function
declaration (or export declaration if an identifier is exported).
We use the webpack-sources dependency as a utility but it doesn't
use anything from webpack and it's a small dep. Could maybe inline into
build.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed React Core Team Opened by a member of the React Core Team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants