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

Make schedulers compatible with babel-plugin-transform-imports #5421

Closed
hlehmann opened this issue May 10, 2020 · 2 comments
Closed

Make schedulers compatible with babel-plugin-transform-imports #5421

hlehmann opened this issue May 10, 2020 · 2 comments
Labels
help wanted Issues we wouldn't mind assistance with.

Comments

@hlehmann
Copy link

Feature Request

All methods are compatible with babel-plugin-transform-imports except schedulers due to their renaming.

# index.js
export { asap as asapScheduler } from './internal/scheduler/asap';
export { async as asyncScheduler } from './internal/scheduler/async';
export { queue as queueScheduler } from './internal/scheduler/queue';
export { animationFrame as animationFrameScheduler } from './internal/scheduler/animationFrame';

babel-plugin-transform-imports allow some build/dev time improvements but require to keep the same name for reexported variables (or to use default) and that's the case for almost all exports.

Would it be possible in future version to avoid this renaming ?

@cartant
Copy link
Collaborator

cartant commented May 10, 2020

Sounds reasonable to me.

@hlehmann hlehmann changed the title Make shedulers compatible with babel-plugin-transform-imports Make schedulers compatible with babel-plugin-transform-imports May 10, 2020
@benlesh benlesh added the help wanted Issues we wouldn't mind assistance with. label May 14, 2020
@cartant
Copy link
Collaborator

cartant commented Mar 14, 2021

Would it be possible in future version to avoid this renaming ?

In version 7, both names are exported:

export const asapScheduler = new AsapScheduler(AsapAction);
/**
* @deprecated Renamed. Use {@link asapScheduler}.
*/
export const asap = asapScheduler;

export { asap, asapScheduler } from './internal/scheduler/asap';

I'm presuming that doing so will address this issue, so I'm closing it.

@cartant cartant closed this as completed Mar 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Issues we wouldn't mind assistance with.
Projects
None yet
Development

No branches or pull requests

3 participants