Open petewilcock opened 3 years ago
Hi @petewilcock,
This is down to the AWS SDK used here. It annoyed me enough years ago to write my own S3 and CloudFront code, but we lose a lot of advantages and introduce more errors doing that, unfortunately.
We could still trim down a custom fork of the AWS SDK, but I'd rather write/find a library that does that repeatedly vs once off.
There's a chance if you're just composer installing, then you're getting dev dependencies, too. There's a build script in tools directory for generating zip installers, I think you can see an example composer command in there for gathering only production files, but your few MB sounds like that already. With all dev dependencies, I think it'd be much bigger.
On mobile now, so not able to confirm, sorry.
Specific need for smaller size? Share the use case and I may have some ideas to solve.
Howdy @leonstafford - I did try a composer install/build --no-dev
but this has had no impact on built size. I do remember this being an issue with other work where the AWS SDK was needed and the full install is massive.
No burning need - I'm just about to launch my long-awaited terraform module that wraps all this together and the s3 zip is the largest asset. 3mb isn't the end of the world though so don't assign it highest priority :)
Very excited to see the TF stuff! Please ping me when ready and I'll spread the word!
Will do! :)
On Sun, 6 Jun 2021, 23:50 Leon Stafford, @.***> wrote:
Very excited to see the TF stuff! Please ping me when ready and I'll spread the word!
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/leonstafford/wp2static-addon-s3/issues/44#issuecomment-855475253, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABRZKONJDUYUYW2MOOKXE5LTRP3RPANCNFSM46GFDHUQ .
The build artifact from
composer build
is hefty at over 3mb. On inspection it seems that the vendor directory has a lot in there. Is it all essential - is there any way to trim this down? Apologies, composer is not my forté.