Skip to content

Commit

Permalink
Fix remaining CommonJS imports after Rollup upgrade (#26473)
Browse files Browse the repository at this point in the history
Follow-up to #26442.

It looks like we missed a few cases where we default import a CommonJS
module, which leads to Rollup adding `.default` access, e.g.
`require('webpack/lib/Template').default` in the output.

To fix, add the remaining cases to the list of exceptions. Verified by
going through all `externals` in the bundle list, and manually checking
the webpack plugin.

DiffTrain build for commit 175962c.
  • Loading branch information
gaearon committed Mar 25, 2023
1 parent 9dca7fd commit 9ed746c
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23649,7 +23649,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-next-9c54b29b4-20230322";
var ReactVersion = "18.3.0-next-175962c10-20230325";

// Might add PROFILE later.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8570,7 +8570,7 @@ var devToolsConfig$jscomp$inline_1029 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-next-9c54b29b4-20230322",
version: "18.3.0-next-175962c10-20230325",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1217 = {
Expand Down Expand Up @@ -8601,7 +8601,7 @@ var internals$jscomp$inline_1217 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-9c54b29b4-20230322"
reconcilerVersion: "18.3.0-next-175962c10-20230325"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1218 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8995,7 +8995,7 @@ var devToolsConfig$jscomp$inline_1072 = {
throw Error("TestRenderer does not support findFiberByHostInstance()");
},
bundleType: 0,
version: "18.3.0-next-9c54b29b4-20230322",
version: "18.3.0-next-175962c10-20230325",
rendererPackageName: "react-test-renderer"
};
var internals$jscomp$inline_1258 = {
Expand Down Expand Up @@ -9026,7 +9026,7 @@ var internals$jscomp$inline_1258 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-9c54b29b4-20230322"
reconcilerVersion: "18.3.0-next-175962c10-20230325"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1259 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ if (
}
"use strict";

var ReactVersion = "18.3.0-next-9c54b29b4-20230322";
var ReactVersion = "18.3.0-next-175962c10-20230325";

// ATTENTION
// When adding new symbols to this file,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -639,4 +639,4 @@ exports.useSyncExternalStore = function (
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-next-9c54b29b4-20230322";
exports.version = "18.3.0-next-175962c10-20230325";
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,7 @@ exports.useSyncExternalStore = function (
);
};
exports.useTransition = useTransition;
exports.version = "18.3.0-next-9c54b29b4-20230322";
exports.version = "18.3.0-next-175962c10-20230325";

/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
if (
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9c54b29b44d24f8f8090da9c7ebf569747a444df
175962c10c53e5adfcfc02a3d6cc3f487d5a78a0
Original file line number Diff line number Diff line change
Expand Up @@ -26914,7 +26914,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-next-9c54b29b4-20230322";
var ReactVersion = "18.3.0-next-175962c10-20230325";

function createPortal$1(
children,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9437,7 +9437,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1049 = {
findFiberByHostInstance: getInstanceFromNode,
bundleType: 0,
version: "18.3.0-next-9c54b29b4-20230322",
version: "18.3.0-next-175962c10-20230325",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForViewTag: function () {
Expand Down Expand Up @@ -9479,7 +9479,7 @@ var internals$jscomp$inline_1292 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-9c54b29b4-20230322"
reconcilerVersion: "18.3.0-next-175962c10-20230325"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1293 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10145,7 +10145,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1128 = {
findFiberByHostInstance: getInstanceFromNode,
bundleType: 0,
version: "18.3.0-next-9c54b29b4-20230322",
version: "18.3.0-next-175962c10-20230325",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForViewTag: function () {
Expand Down Expand Up @@ -10200,7 +10200,7 @@ var roots = new Map(),
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-9c54b29b4-20230322"
reconcilerVersion: "18.3.0-next-175962c10-20230325"
});
exports.createPortal = function (children, containerTag) {
return createPortal$1(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27454,7 +27454,7 @@ function createFiberRoot(
return root;
}

var ReactVersion = "18.3.0-next-9c54b29b4-20230322";
var ReactVersion = "18.3.0-next-175962c10-20230325";

function createPortal$1(
children,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9693,7 +9693,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1108 = {
findFiberByHostInstance: getInstanceFromTag,
bundleType: 0,
version: "18.3.0-next-9c54b29b4-20230322",
version: "18.3.0-next-175962c10-20230325",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForViewTag: function () {
Expand Down Expand Up @@ -9735,7 +9735,7 @@ var internals$jscomp$inline_1358 = {
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-9c54b29b4-20230322"
reconcilerVersion: "18.3.0-next-175962c10-20230325"
};
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var hook$jscomp$inline_1359 = __REACT_DEVTOOLS_GLOBAL_HOOK__;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10401,7 +10401,7 @@ var roots = new Map(),
devToolsConfig$jscomp$inline_1187 = {
findFiberByHostInstance: getInstanceFromTag,
bundleType: 0,
version: "18.3.0-next-9c54b29b4-20230322",
version: "18.3.0-next-175962c10-20230325",
rendererPackageName: "react-native-renderer",
rendererConfig: {
getInspectorDataForViewTag: function () {
Expand Down Expand Up @@ -10456,7 +10456,7 @@ var roots = new Map(),
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.3.0-next-9c54b29b4-20230322"
reconcilerVersion: "18.3.0-next-175962c10-20230325"
});
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = {
computeComponentStackForErrorReporting: function (reactTag) {
Expand Down

0 comments on commit 9ed746c

Please sign in to comment.