Add option to disable the plugin
There is a way to disable the plugin.
Error:
Unhandled rejection Error: ENOENT: no such file or directory, symlink 'home/../node_modules' -> '/home/.build/node_modules'
Use case:
We use plugin for serverless project. There are few different stacks and we use parametrized serverless to include what we need for every specific stack. Sometimes we only wrap cloudformation template within serverless and deploy it. That was a requirement.
Description
When we don't have functions (lambdas) within that stack and have only wrapped cloudformation template, plugin throws the following error:
Unhandled rejection Error: ENOENT: no such file or directory, symlink 'home/../node_modules' -> '/home/.build/node_modules'
That means that serverless don't create .build aidirectory because plugin can not exclude node_modules and than deploying and packaging fails.
Solution:
Obviously, we need possibility to disable plugin at least in this situation. I added 2 ways to do that.
1.Adding a typescriptPlugin section to the custom section of your serverless.yml to set default value if needed:
custom:
typescriptPlugin:
enabled: false
- Passing the following command line option to serverless command:
--typescript-plugin [disabled|off|false]
The second option will override default value.