From 824458d4c6fd8221849cb6f39dc2ca34a9893ff3 Mon Sep 17 00:00:00 2001 From: Daniel Sellers Date: Mon, 7 Jan 2019 09:43:47 -0700 Subject: [PATCH] Adds documentation in the readme --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index dd54c9c90..6d792e515 100644 --- a/README.md +++ b/README.md @@ -431,6 +431,25 @@ from a local folder (e.g. `"mymodule": "file:../../myOtherProject/mymodule"`). With that you can do test deployments from the local machine with different module versions or modules before they are published officially. +#### Exclude Files with similar names + +If you have a project structure that uses something like `index.js` and a +co-located `index.test.js` then you have likely seen an error like: +`WARNING: More than one matching handlers found for index. Using index.js` + +This config option allows you to exlcude files that match a glob from function +resolution. Just add: `excludeFiles: **/*.test.js` (with whatever glob you want +to exclude). + +```yaml +# serverless.yml +custom: + webpack: + excludeFiles: **/*.test.js +``` + +This is also useful for projects that use TypeScript. + #### Examples You can find an example setups in the [`examples`][link-examples] folder.