Skip to content

Commit

Permalink
Cleaned up inline comment about scheduling fork
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Vaughn committed Sep 1, 2018
1 parent 5d9edc9 commit c5b4db2
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions scripts/rollup/forks.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,15 @@ const forks = Object.freeze({
case UMD_DEV:
case UMD_PROD:
if (dependencies.indexOf('react') === -1) {
// For CJS bundles, use the shared NPM package.
// It's only safe to use this fork for modules that depend on React,
// because they read the re-exported API from the SECRET_INTERNALS object.
return null;
}
// Optimization: for UMDs, use the API that is already a part of the React
// package instead of requiring it to be loaded via a separate <script> tag
return 'shared/forks/ReactScheduler.umd.js';
default:
// For CJS bundles, use the shared NPM package.
return null;
}
},
Expand All @@ -139,13 +141,15 @@ const forks = Object.freeze({
case UMD_DEV:
case UMD_PROD:
if (dependencies.indexOf('react') === -1) {
// For CJS bundles, use the shared NPM package.
// It's only safe to use this fork for modules that depend on React,
// because they read the re-exported API from the SECRET_INTERNALS object.
return null;
}
// Optimization: for UMDs, use the API that is already a part of the React
// package instead of requiring it to be loaded via a separate <script> tag
return 'shared/forks/ReactSchedulerTracking.umd.js';
default:
// For CJS bundles, use the shared NPM package.
return null;
}
},
Expand All @@ -159,13 +163,15 @@ const forks = Object.freeze({
case UMD_DEV:
case UMD_PROD:
if (dependencies.indexOf('react') === -1) {
// For CJS bundles, use the shared NPM package.
// It's only safe to use this fork for modules that depend on React,
// because they read the re-exported API from the SECRET_INTERNALS object.
return null;
}
// Optimization: for UMDs, use the API that is already a part of the React
// package instead of requiring it to be loaded via a separate <script> tag
return 'shared/forks/ReactSchedulerTrackingSubscriptions.umd.js';
default:
// For CJS bundles, use the shared NPM package.
return null;
}
},
Expand Down

0 comments on commit c5b4db2

Please sign in to comment.