Notify serverless-offline when watched files trigger rebuild #488
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is my first time contributing. Please let me know what you'd like to see in terms of tests, documentation, etc - thanks!
Background
serverless-offline
+serverless-esbuild
setup, watching for changes does not workProblem
--reloadHandler
solution proposed in the above issue drastically hurts local dev performance on a large projectProposal
serverless-offline
when it needs to clear the cacheAlternatives
serverless-webpack
, which already supports lifecycle hooks, I use a custom plugin to solve this exact same problem: