react/packages/react-server-dom-webpack
Andrew Clark 857ee8cdf9
Don't minify symbols in production builds (#28881)
This disables symbol renaming in production builds. The original
variable and function names are preserved. All other forms of
compression applied by Closure (dead code elimination, inlining, etc)
are unchanged — the final program is identical to what we were producing
before, just in a more readable form.

The motivation is to make it easier to debug React issues that only
occur in production — the same reason we decided to start shipping
sourcemaps in #28827 and #28827.

However, because most apps run their own minification step on their npm
dependencies, it's not necessary for us to minify the symbols before
publishing — it'll be handled the app, if desired.

This is the same strategy Meta has used to ship React for years. The
React build itself has unminified symbols, but they get minified as part
of Meta's regular build pipeline.

Even if an app does not minify their npm dependencies, gzip covers most
of the cost of symbol renaming anyway.

This saves us from having to ship sourcemaps, which means even apps that
don't have sourcemaps configured will be able to debug the React build
as easily as they would any other npm dependency.
2024-04-20 11:23:46 -04:00
..
esm Don't minify symbols in production builds (#28881) 2024-04-20 11:23:46 -04:00
npm Don't minify symbols in production builds (#28881) 2024-04-20 11:23:46 -04:00
src [Flight] Encode ReadableStream and AsyncIterables (#28847) 2024-04-16 12:20:07 -04:00
client.browser.js Split out Edge and Node implementations of the Flight Client (#26187) 2023-02-21 13:18:24 -05:00
client.edge.js Split out Edge and Node implementations of the Flight Client (#26187) 2023-02-21 13:18:24 -05:00
client.js Create a bunch of custom webpack vs unbundled node bundles (#26172) 2023-02-16 11:01:52 -05:00
client.node.js Split out Edge and Node implementations of the Flight Client (#26187) 2023-02-21 13:18:24 -05:00
client.node.unbundled.js Split out Edge and Node implementations of the Flight Client (#26187) 2023-02-21 13:18:24 -05:00
index.js [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
node-register.js [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
package.json Don't minify symbols in production builds (#28881) 2024-04-20 11:23:46 -04:00
plugin.js [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
README.md [Flight] Rename react-transport-... packages to react-server-... (#20403) 2020-12-08 08:08:57 -05:00
server.browser.js [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
server.edge.js Add Edge Server Builds for workerd / edge-light (#26116) 2023-02-07 15:10:01 -05:00
server.js [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
server.node.js [Codemod] Update copyright header to Meta (#25315) 2022-10-18 11:19:24 -04:00
server.node.unbundled.js Create a bunch of custom webpack vs unbundled node bundles (#26172) 2023-02-16 11:01:52 -05:00

react-server-dom-webpack

Experimental React Flight bindings for DOM using Webpack.

Use it at your own risk.