-
Notifications
You must be signed in to change notification settings - Fork 416
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Skip compile & packaging if --no-build is set #504
Conversation
I tested this today, everything is working as I would expect. what is left to do before this is ready for review? |
I will do a review this weekend and I've already tagged the related issue with 5.4.0 :-) |
Hi @jamesmbourne, thanks for the PR 👍 ! Any chance you could add some documentation to the |
Hey @hassankhan yes I will make sure to update that. Testing it locally with a real deployment I have noticed some issues where it seems to bundle This appears to call the packaging phase - is there something that will need to be modified within that as well to be aware of the |
any updates on this? |
@shredder2500 I've been a bit busy recently but I'll have another look at it and try and get the PR read for review! |
@HyperBrain I've done some more digging at it seems like we will need to only skip the In the const stats = {
stats: [
{
compilation: {
compiler: {
outputPath: "/my/Service/Path/.webpack/service"
}
}
}
]
}; If compile is skipped, we do not have this object to determine what has already been built. Perhaps we can use the information provided by Do you have any thoughts on this? |
popping in again to see if there is any progress. hope yall dont mind. I just need this in order to be able to use this. |
Hi guys, I'm also just popping in to see where this is at? Is there anything i can do? |
any updates? |
Sorry for the lack of updates on this - I'm currently occupied with other projects and commitments. The My suggestion would to generate some sort of 'manifest' file after the build phase which includes the necessary information from Webpack but it would be good to hear any other suggestions. I'll endeavour to pick this back up as it does seem a feature that plenty of people would find useful. |
is this just waiting on the code coverage check now? |
is this PR dead? |
Sorry @ctaylor28, I've been too busy to be working on this at the moment. I've picked it up again and will try and get the PR ready for review. I think it just needs some tests putting in for the |
looks like you also have two failing tests |
@HyperBrain I think this should be good for review now if you're available to do so. |
@HyperBrain any chance we can get this reviewed soon? |
After having a think about this, we could probably simplify this to avoid the need to serialise the Webpack stats entirely.
I will open a new PR with that implementation and close this one. This approach should be much simpler as we do not need to get involved in |
@jamesmbourne have you made another PR or started work on the other way yet? |
For future lost souls, this is addressed in and superseded by #560. |
@vicary Thank You! |
What did you implement:
Closes #398
Allow the
--no-build
flag to commands that invoke thebefore:package:createDeploymentArtifacts
hook. This means that build output can be generated (e.g. in CI environments) and then deployed without having to re-build each time.How did you implement it:
Use the existing
build
option to skip thecompile
andpackage
steps for thebefore:package:createDeploymentArtifacts
hook.How can we verify it:
sls webpack
sls deploy --no-build
.webpack
(or other as specified by--out
) directory should be used an no Webpack compilation occursTodos:
Is this ready for review?: YES
Is it a breaking change?: NO