You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi @lext-7, thanks for the report. My impression is that babel-plugin-transform-runtime doesn't make sense for Sucrase, but let me know if disagree and know more concretely what it would do. To be clear, the compiled output of Sucrase is only meant to be run on newer JS engines like Node 8+ and recent versions of Chrome and Firefox.
My understanding is that that Babel plugin serves two purposes:
It extracts out the various helper functions used by Babel into a shared library to avoid the functions being repeated in each file. Sucrase doesn't have any of these helper functions (aside from the interopRequire functions which aren't handled by babel-plugin-transform-runtime and don't really make sense to import), so there's nothing to extract out.
It provides polyfill-like transforms for some globals like Promise, Set, and Map. These are all already provided by newer JS engines, so there's no need to transform them.
Does that make sense? If you still think it would be useful, it may be good to frame it in terms of the problem you're trying to solve.
Hope it support transform-runtime.
The text was updated successfully, but these errors were encountered: