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

Use native scheduler if defined in global scope #26554

Merged
merged 9 commits into from
May 5, 2023
9 changes: 9 additions & 0 deletions packages/scheduler/npm/index.native.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
'use strict';

if (typeof global.nativeRuntimeScheduler !== 'undefined') {
sammy-SC marked this conversation as resolved.
Show resolved Hide resolved
module.exports = global.nativeRuntimeScheduler;
} else if (process.env.NODE_ENV === 'production') {
module.exports = require('./cjs/scheduler.production.min.js');
} else {
module.exports = require('./cjs/scheduler.development.js');
}