bencao / netlify-plugin-inline-functions-env

Inline build time environment variable values into netlify function code so that it becomes available at runtime
MIT License
42 stars 10 forks source link

Fix Node 10 support #16

Closed ehmicky closed 4 years ago

ehmicky commented 4 years ago

Array.flat() is not supported in Node 10:

https://github.com/bencao/netlify-plugin-inline-functions-env/blob/d4b042817b5566abd9d73819353f320265461bb6/index.js#L39-L40

This could be fixed by using instead:

const include = inputs.include && [].concat(...[inputs.include])
const exclude = inputs.exclude && [].concat(...[inputs.exclude])
bencao commented 4 years ago

fixed with v1.0.8