forked from jaredpalmer/tsdx
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
change: replace async-to-promises with regenerator
- as an alternative to transpile async functions because babel-plugin-transform-async-to-promises has several correctness / transpilation bugs and has been unmaintained for a while now - Add useBuiltIns option to automatically add regeneratorRuntime imports if needed - Remove @babel/plugin-transform-regenerator and custom merging logic - no longer needed because we now _are_ using it for async and so can use the default options - the default options are already included with @babel/preset-env, so this is now an extraneous package - Replace deprecated @babel/polyfill with direct dependencies to regenerator-runtime and (already installed) core-js - and specify the corejs version in the preset-env config to resolve a warning during `tsdx build` - warning says that matching core-js version should be installed and specified explicitly with useBuiltIns, because the default version of 2.x is "likely to change" - Add regenerator-runtime and core-js to external, so that the polyfills are included in the bundle - Always transform core-js to ESM, to fix its own internal, transitive dependencies not being found by the current (naive) external algorithm
- Loading branch information
Showing
4 changed files
with
17 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters