Document ignored_node_modules option in netlify.toml
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 1.9k
- Forks
- 474
- Avg merge
- 23h 30m
- Merged PRs (30d)
- 53
Description
Which problem is this feature request solving?
I spent a day trying to figure out how to exclude a module from a function bundle that was over 50MB. Puppeteer doesn't leave much room and the aws-sdk v3 (despite it's tree-shaken smaller size than v2) tipped the scale and the function could not deploy.
I found out Lambdas have aws-sdk included by default so I wanted to exclude the redundant module from the bundle. I searched through the documentation, Netlify forums and poked around in the Netlify CLI source code. However, it wasn't until I found this config on zip-it-and-ship-it that I realized what to search for in the CLI source code. I found it here.
This option (as well as a number of other newer options like [dev] envFiles) are undocumented.
Describe the solution you'd like
Update the following documentation to include ignored_node_modules under the [functions] heading.
https://docs.netlify.com/configure-builds/file-based-configuration/
As far as I can tell, the docs are not open source so I can't even make a PR to fix them.
Pull request (optional)
- I can submit a pull request.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the file-based configuration documentation and the referenced src/lib/functions/config.js entry point to confirm how ignored_node_modules is handled. Done means the [functions] documentation includes this option, although the issue notes that the documentation repository is not open source.
Written by the indexing model from the issue text.
Assessment
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100