core-js slows down loading and slows down javascript builtins adding polyfills serverless don't use at all.
This problem becomes worse if a newer version of core-js is used.
At the moment, both this package and serverless seems to need only the regenerator runtime and not all other the polyfills.
This Pull Request removes babel-polyfill dependency and replaces it with regenerator-runtime.
A new file runtime.js is used both by jest and by the library to correctly load regenerator-runtime.
Many thanks to @paolopiaggio for discovering the problem and helping testing and come out with the idea.
https://github.com/serverless/platform-sdk/issues/3#issuecomment-453624473
core-js slows down loading and slows down javascript builtins adding polyfills serverless don't use at all. This problem becomes worse if a newer version of core-js is used.
At the moment, both this package and serverless seems to need only the regenerator runtime and not all other the polyfills.
This Pull Request removes
babel-polyfill
dependency and replaces it withregenerator-runtime
.A new file
runtime.js
is used both by jest and by the library to correctly loadregenerator-runtime
.Many thanks to @paolopiaggio for discovering the problem and helping testing and come out with the idea.