From 21aa2bffa3a530f5a62966adfb25f0a433a80f73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Van=20der=20Auwermeulen=20Gr=C3=A9goire?= Date: Fri, 9 Jun 2017 10:02:52 +0200 Subject: [PATCH] How to work with a full stack plugins This is part off this change in serverless-webpack: https://github.com/elastic-coders/serverless-webpack/pull/131 Explain how to work with the serverless-offline, serverless-webpack and serverless-dynamodb-local --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index 14802f68..e788548a 100644 --- a/README.md +++ b/README.md @@ -176,6 +176,17 @@ Make sure that `serverless-dynamodb-local` is above `serverless-offline` so it w Now your local DynamoDB database will be automatically started before running `serverless offline`. +### Using with serverless-offline and serverless-webpack plugin +Run `serverless offline start`. In comparison with `serverless offline`, the `start` command will fire an `init` and a `end` lifecycle hook which is needed for serverless-offline and serverless-dynamodb-local to switch off both ressources. + +Add plugins to your `serverless.yml` file: +```yaml +plugins: + - serverless-webpack + - serverless-dynamodb-local + - serverless-offline #serverless-offline needs to be last in the list +``` + ## Reference Project * [serverless-react-boilerplate](https://github.com/99xt/serverless-react-boilerplate)