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

Don't minify symbols in production builds #28881

Merged
merged 1 commit into from
Apr 20, 2024
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
4 changes: 2 additions & 2 deletions dangerfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ const SIGNIFICANCE_THRESHOLD = 0.002;
const CRITICAL_ARTIFACT_PATHS = new Set([
// We always report changes to these bundles, even if the change is
// insignificant or non-existent.
'oss-stable/react-dom/cjs/react-dom.production.min.js',
'oss-experimental/react-dom/cjs/react-dom.production.min.js',
'oss-stable/react-dom/cjs/react-dom.production.js',
'oss-experimental/react-dom/cjs/react-dom.production.js',
'facebook-www/ReactDOM-prod.classic.js',
'facebook-www/ReactDOM-prod.modern.js',
]);
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@
"shelljs": "^0.8.5",
"signedsource": "^2.0.0",
"targz": "^1.0.1",
"terser": "^5.30.3",
"through2": "^3.0.1",
"tmp": "^0.1.0",
"typescript": "^3.7.5",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-react-hooks/npm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// TODO: this doesn't make sense for an ESLint rule.
// We need to fix our build process to not create bundles for "raw" packages like this.
if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/eslint-plugin-react-hooks.production.min.js');
module.exports = require('./cjs/eslint-plugin-react-hooks.production.js');
} else {
module.exports = require('./cjs/eslint-plugin-react-hooks.development.js');
}
2 changes: 1 addition & 1 deletion packages/jest-react/npm/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/jest-react.production.min.js');
module.exports = require('./cjs/jest-react.production.js');
} else {
module.exports = require('./cjs/jest-react.development.js');
}
2 changes: 1 addition & 1 deletion packages/react-art/npm/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-art.production.min.js');
module.exports = require('./cjs/react-art.production.js');
} else {
module.exports = require('./cjs/react-art.development.js');
}
2 changes: 1 addition & 1 deletion packages/react-cache/npm/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-cache.production.min.js');
module.exports = require('./cjs/react-cache.production.js');
} else {
module.exports = require('./cjs/react-cache.development.js');
}
2 changes: 1 addition & 1 deletion packages/react-client/npm/flight.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-client-flight.production.min.js');
module.exports = require('./cjs/react-client-flight.production.js');
} else {
module.exports = require('./cjs/react-client-flight.development.js');
}
2 changes: 1 addition & 1 deletion packages/react-debug-tools/npm/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-debug-tools.production.min.js');
module.exports = require('./cjs/react-debug-tools.production.js');
} else {
module.exports = require('./cjs/react-debug-tools.development.js');
}
2 changes: 1 addition & 1 deletion packages/react-dom/npm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if (process.env.NODE_ENV === 'production') {
// DCE check should happen before ReactDOM bundle executes so that
// DevTools can report bad minification during injection.
checkDCE();
module.exports = require('./cjs/react-dom.production.min.js');
module.exports = require('./cjs/react-dom.production.js');
} else {
module.exports = require('./cjs/react-dom.development.js');
}
2 changes: 1 addition & 1 deletion packages/react-dom/npm/profiling.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if (process.env.NODE_ENV === 'production') {
// DCE check should happen before ReactDOM bundle executes so that
// DevTools can report bad minification during injection.
checkDCE();
module.exports = require('./cjs/react-dom.profiling.min.js');
module.exports = require('./cjs/react-dom.profiling.js');
} else {
module.exports = require('./cjs/react-dom.development.js');
}
2 changes: 1 addition & 1 deletion packages/react-dom/npm/react-dom.react-server.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-dom.react-server.production.min.js');
module.exports = require('./cjs/react-dom.react-server.production.js');
} else {
module.exports = require('./cjs/react-dom.react-server.development.js');
}
2 changes: 1 addition & 1 deletion packages/react-dom/npm/server-rendering-stub.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-dom-server-rendering-stub.production.min.js');
module.exports = require('./cjs/react-dom-server-rendering-stub.production.js');
} else {
module.exports = require('./cjs/react-dom-server-rendering-stub.development.js');
}
4 changes: 2 additions & 2 deletions packages/react-dom/npm/server.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

var l, s;
if (process.env.NODE_ENV === 'production') {
l = require('./cjs/react-dom-server-legacy.browser.production.min.js');
s = require('./cjs/react-dom-server.browser.production.min.js');
l = require('./cjs/react-dom-server-legacy.browser.production.js');
s = require('./cjs/react-dom-server.browser.production.js');
} else {
l = require('./cjs/react-dom-server-legacy.browser.development.js');
s = require('./cjs/react-dom-server.browser.development.js');
Expand Down
4 changes: 2 additions & 2 deletions packages/react-dom/npm/server.bun.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
var b;
var l;
if (process.env.NODE_ENV === 'production') {
b = require('./cjs/react-dom-server.bun.production.min.js');
l = require('./cjs/react-dom-server-legacy.browser.production.min.js');
b = require('./cjs/react-dom-server.bun.production.js');
l = require('./cjs/react-dom-server-legacy.browser.production.js');
} else {
b = require('./cjs/react-dom-server.bun.development.js');
l = require('./cjs/react-dom-server-legacy.browser.development.js');
Expand Down
4 changes: 2 additions & 2 deletions packages/react-dom/npm/server.edge.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
var b;
var l;
if (process.env.NODE_ENV === 'production') {
b = require('./cjs/react-dom-server.edge.production.min.js');
l = require('./cjs/react-dom-server-legacy.browser.production.min.js');
b = require('./cjs/react-dom-server.edge.production.js');
l = require('./cjs/react-dom-server-legacy.browser.production.js');
} else {
b = require('./cjs/react-dom-server.edge.development.js');
l = require('./cjs/react-dom-server-legacy.browser.development.js');
Expand Down
4 changes: 2 additions & 2 deletions packages/react-dom/npm/server.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

var l, s;
if (process.env.NODE_ENV === 'production') {
l = require('./cjs/react-dom-server-legacy.node.production.min.js');
s = require('./cjs/react-dom-server.node.production.min.js');
l = require('./cjs/react-dom-server-legacy.node.production.js');
s = require('./cjs/react-dom-server.node.production.js');
} else {
l = require('./cjs/react-dom-server-legacy.node.development.js');
s = require('./cjs/react-dom-server.node.development.js');
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dom/npm/static.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

var s;
if (process.env.NODE_ENV === 'production') {
s = require('./cjs/react-dom-server.browser.production.min.js');
s = require('./cjs/react-dom-server.browser.production.js');
} else {
s = require('./cjs/react-dom-server.browser.development.js');
}
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dom/npm/static.edge.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

var s;
if (process.env.NODE_ENV === 'production') {
s = require('./cjs/react-dom-server.edge.production.min.js');
s = require('./cjs/react-dom-server.edge.production.js');
} else {
s = require('./cjs/react-dom-server.edge.development.js');
}
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dom/npm/static.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

var s;
if (process.env.NODE_ENV === 'production') {
s = require('./cjs/react-dom-server.node.production.min.js');
s = require('./cjs/react-dom-server.node.production.js');
} else {
s = require('./cjs/react-dom-server.node.development.js');
}
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dom/npm/test-utils.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-dom-test-utils.production.min.js');
module.exports = require('./cjs/react-dom-test-utils.production.js');
} else {
module.exports = require('./cjs/react-dom-test-utils.development.js');
}
2 changes: 1 addition & 1 deletion packages/react-dom/npm/unstable_testing.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ if (process.env.NODE_ENV === 'production') {
// DCE check should happen before ReactDOM bundle executes so that
// DevTools can report bad minification during injection.
checkDCE();
module.exports = require('./cjs/react-dom-unstable_testing.production.min.js');
module.exports = require('./cjs/react-dom-unstable_testing.production.js');
} else {
module.exports = require('./cjs/react-dom-unstable_testing.development.js');
}
2 changes: 1 addition & 1 deletion packages/react-is/npm/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-is.production.min.js');
module.exports = require('./cjs/react-is.production.js');
} else {
module.exports = require('./cjs/react-is.development.js');
}
2 changes: 1 addition & 1 deletion packages/react-noop-renderer/npm/flight-client.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-noop-renderer-flight-client.production.min.js');
module.exports = require('./cjs/react-noop-renderer-flight-client.production.js');
} else {
module.exports = require('./cjs/react-noop-renderer-flight-client.development.js');
}
2 changes: 1 addition & 1 deletion packages/react-noop-renderer/npm/flight-server.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-noop-renderer-flight-server.production.min.js');
module.exports = require('./cjs/react-noop-renderer-flight-server.production.js');
} else {
module.exports = require('./cjs/react-noop-renderer-flight-server.development.js');
}
2 changes: 1 addition & 1 deletion packages/react-noop-renderer/npm/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-noop-renderer.production.min.js');
module.exports = require('./cjs/react-noop-renderer.production.js');
} else {
module.exports = require('./cjs/react-noop-renderer.development.js');
}
2 changes: 1 addition & 1 deletion packages/react-noop-renderer/npm/persistent.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-noop-renderer-persistent.production.min.js');
module.exports = require('./cjs/react-noop-renderer-persistent.production.js');
} else {
module.exports = require('./cjs/react-noop-renderer-persistent.development.js');
}
2 changes: 1 addition & 1 deletion packages/react-noop-renderer/npm/server.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-noop-renderer-server.production.min.js');
module.exports = require('./cjs/react-noop-renderer-server.production.js');
} else {
module.exports = require('./cjs/react-noop-renderer-server.development.js');
}
2 changes: 1 addition & 1 deletion packages/react-reconciler/npm/constants.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-reconciler-constants.production.min.js');
module.exports = require('./cjs/react-reconciler-constants.production.js');
} else {
module.exports = require('./cjs/react-reconciler-constants.development.js');
}
2 changes: 1 addition & 1 deletion packages/react-reconciler/npm/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-reconciler.production.min.js');
module.exports = require('./cjs/react-reconciler.production.js');
} else {
module.exports = require('./cjs/react-reconciler.development.js');
}
2 changes: 1 addition & 1 deletion packages/react-reconciler/npm/reflection.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-reconciler-reflection.production.min.js');
module.exports = require('./cjs/react-reconciler-reflection.production.js');
} else {
module.exports = require('./cjs/react-reconciler-reflection.development.js');
}
2 changes: 1 addition & 1 deletion packages/react-refresh/npm/babel.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-refresh-babel.production.min.js');
module.exports = require('./cjs/react-refresh-babel.production.js');
} else {
module.exports = require('./cjs/react-refresh-babel.development.js');
}
2 changes: 1 addition & 1 deletion packages/react-refresh/npm/runtime.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-refresh-runtime.production.min.js');
module.exports = require('./cjs/react-refresh-runtime.production.js');
} else {
module.exports = require('./cjs/react-refresh-runtime.development.js');
}
2 changes: 1 addition & 1 deletion packages/react-server-dom-esm/npm/client.browser.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-server-dom-esm-client.browser.production.min.js');
module.exports = require('./cjs/react-server-dom-esm-client.browser.production.js');
} else {
module.exports = require('./cjs/react-server-dom-esm-client.browser.development.js');
}
2 changes: 1 addition & 1 deletion packages/react-server-dom-esm/npm/client.node.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-server-dom-esm-client.node.production.min.js');
module.exports = require('./cjs/react-server-dom-esm-client.node.production.js');
} else {
module.exports = require('./cjs/react-server-dom-esm-client.node.development.js');
}
2 changes: 1 addition & 1 deletion packages/react-server-dom-esm/npm/server.node.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-server-dom-esm-server.node.production.min.js');
module.exports = require('./cjs/react-server-dom-esm-server.node.production.js');
} else {
module.exports = require('./cjs/react-server-dom-esm-server.node.development.js');
}
2 changes: 1 addition & 1 deletion packages/react-server-dom-esm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"default": "./server.js"
},
"./server.node": "./server.node.js",
"./node-loader": "./esm/react-server-dom-esm-node-loader.production.min.js",
"./node-loader": "./esm/react-server-dom-esm-node-loader.production.js",
"./src/*": "./src/*.js",
"./package.json": "./package.json"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/react-server-dom-turbopack/npm/client.browser.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-server-dom-turbopack-client.browser.production.min.js');
module.exports = require('./cjs/react-server-dom-turbopack-client.browser.production.js');
} else {
module.exports = require('./cjs/react-server-dom-turbopack-client.browser.development.js');
}
2 changes: 1 addition & 1 deletion packages/react-server-dom-turbopack/npm/client.edge.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-server-dom-turbopack-client.edge.production.min.js');
module.exports = require('./cjs/react-server-dom-turbopack-client.edge.production.js');
} else {
module.exports = require('./cjs/react-server-dom-turbopack-client.edge.development.js');
}
2 changes: 1 addition & 1 deletion packages/react-server-dom-turbopack/npm/client.node.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-server-dom-turbopack-client.node.production.min.js');
module.exports = require('./cjs/react-server-dom-turbopack-client.node.production.js');
} else {
module.exports = require('./cjs/react-server-dom-turbopack-client.node.development.js');
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-server-dom-turbopack-client.node.unbundled.production.min.js');
module.exports = require('./cjs/react-server-dom-turbopack-client.node.unbundled.production.js');
} else {
module.exports = require('./cjs/react-server-dom-turbopack-client.node.unbundled.development.js');
}
2 changes: 1 addition & 1 deletion packages/react-server-dom-turbopack/npm/server.browser.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-server-dom-turbopack-server.browser.production.min.js');
module.exports = require('./cjs/react-server-dom-turbopack-server.browser.production.js');
} else {
module.exports = require('./cjs/react-server-dom-turbopack-server.browser.development.js');
}
2 changes: 1 addition & 1 deletion packages/react-server-dom-turbopack/npm/server.edge.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-server-dom-turbopack-server.edge.production.min.js');
module.exports = require('./cjs/react-server-dom-turbopack-server.edge.production.js');
} else {
module.exports = require('./cjs/react-server-dom-turbopack-server.edge.development.js');
}
2 changes: 1 addition & 1 deletion packages/react-server-dom-turbopack/npm/server.node.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/react-server-dom-turbopack-server.node.production.min.js');
module.exports = require('./cjs/react-server-dom-turbopack-server.node.production.js');
} else {
module.exports = require('./cjs/react-server-dom-turbopack-server.node.development.js');
}
Loading