Hi all,
Just started using Serverless and loving it. I’m working on a project that uses an existing AWS Layer. My development environment is (usually) Windows which causes problems with some compiled node modules. In production, this is resolved by the Layer but in the dev environment, I need a way to use the local non-layer-ified equivalent library.
I’ve included the library under devDependencies which keeps sls deploy
happy. What I really need are 2 different node_modules: One for the local equivalent of layer-ified modules, and one for all others.
Unfortunately, the dep in question has a massive amount of dependencies itself, so an exclude rule would barely make a dent.
So, to boil it down:
- What’s the correct way to handle code provided by external layers when testing locally?
- What’s the best way to separate a subset of local and production dependencies? Is devDependencies enough in this case?
Thanks!