How to Include Files in Netlify Serverless Functions
Blog post from Netlify
Netlify's zip-it-and-ship-it tool handles the process of finding all files used by a deployed function, including those referenced with dynamic expressions, by recursively marking each required file and discarding any unused ones. To make this work, Netlify has integrated esbuild's plugin API to intercept and transform references with dynamic expressions, allowing for zero-configuration deployment of functions that reference external files based on runtime conditions. This can be achieved through manual configuration using the included_files property in netlify.toml or by opting-in to esbuild's bundler for automatic inclusion.
| Trend | Post Mentions | Total Month Mentions | Posts | Companies | MoM |
|---|---|---|---|---|---|
| Serverless | 10 | 671 | 99 | 46 | +71% |
Use this post, company, and trend context to find content marketing opportunities, perform competitive analysis, or address product feature gaps via the Plushcap MCP server or the Plushcap API.