You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is the use case that should be solved. The more detail you describe this in the easier it is to understand for us.
We test our functions by running sls invoke local --function blah in CI. It is one of our slowest parts of pipeline. It would be ideal if it could be built once and flagged not to build again.
sls webpack
sls invoke local --function blah1 --noBuild
sls invoke local --function blah2 --noBuild
Similar or dependent issue(s):
n/a
Additional Data
Serverless-Webpack Version you're using: 4.1.0
Webpack version you're using: 3.8.1
Serverless Framework Version you're using: 1.25
Operating System: OS X/Linux
Reacted by Christopher Fitzner, Rishit Kedia and Aleksei
Hi @sime . I agree, especially in a CI context the pattern is 1 * build, n * invoke. So, a single compile would make sense and a switch to disable building explicitly on all subsequent invokes.
@sime Sounds good. I'll merge the PR now (and delete the branch). Please change to master to keep your builds working in case you continue to use it before the release.
Activity
sime commentedon Mar 8, 2018
Same query on Serverless forums: https://forum.serverless.com/t/invoke-serverless-function-and-skip-a-plugin-webpack/3805
HyperBrain commentedon Mar 8, 2018
Hi @sime . I agree, especially in a CI context the pattern is 1 * build, n * invoke. So, a single compile would make sense and a switch to disable building explicitly on all subsequent invokes.
This is related to #288 and might solve this too.
HyperBrain commentedon Mar 13, 2018
PR available for testing. Use
"serverless-webpack": "github:serverless-heaven/serverless-webpack#skip-build-with-invoke-local"HyperBrain commentedon Mar 14, 2018
@sime Do you have any chance to test the PR?
sime commentedon Mar 14, 2018
@HyperBrain We run our CI on Travis and just tested it. CI time is now 2 minutes faster!
HyperBrain commentedon Mar 14, 2018
@sime Sounds good. I'll merge the PR now (and delete the branch). Please change to master to keep your builds working in case you continue to use it before the release.
HyperBrain commentedon Mar 14, 2018
Released with 5.1.0