netlify-plugin-inline-functions-env
netlify-plugin-inline-functions-env copied to clipboard
feature request: include & exclude function paths
Thanks for the plugin.
Would be great if you could add include
and exclude
also for function names / paths and not just for env vars.
My problem is that in a nextjs, @netlify/plugin-nextjs generates a huge amount of lambdas and their requires (121 to be precise in my case). Some of these functions, are also pretty massive 500Kb to mbs depending how heavy a given "api" route is.
In my simple use case, I want to pass only one env bar netlify's process.env.BRANCH
to just one single function, but the plugin is processing all the hundredths of .js files via babel which takes a huge amount of time killing my build minutes.
Anyway, thought I'd throw in here since nextjs is becoming pretty popular within netlify.
thanks again. JP
Happy to submit a PR.
Just wanted to bump this feature request! We're also looking for a way to workaround the underlying platform limitation that this plugin solves with Next.js and hit a wall with the latest version of the Netlify build plugin: https://github.com/netlify/netlify-plugin-nextjs/issues/751