serverless / platform-sdk

Serverless Platform SDK
Apache License 2.0
17 stars 7 forks source link

regenerator-runtime instead of babel-polyfill #34

Closed dschep closed 5 years ago

dschep commented 5 years ago

closes #24

paolopiaggio commented 5 years ago

nice PR @SalvatorePreviti ;)

dschep commented 5 years ago

nevermind. can't do this bc babel-polyfill is needed for things like Object.values & Object.entries in older node versions

SalvatorePreviti commented 5 years ago

I see. Would you like a PR where the code is refactored to work on old node versions without the use of core-js or regenerator-runtime?

SalvatorePreviti commented 5 years ago

Another option would be to load core-js only if node is less than 8.10.0, load regenerator-runtime if >=

dschep commented 5 years ago

where the code is refactored to work on old node versions without the use of core-js or regenerator-runtime

meaning, something like using _.entries and _.values instead of functions that need to be polyfilled?

If so, I think I prefer your second suggestion (version based loading)