-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Large public folder on build #2923
Comments
Ooops sorry just seen the guidelines for posting here. Gatsby version: ^1.9.108, package.json
gatsby-config.js
gatsby-node.js
Thanks |
Yeah does seem a bit large. A fresh build of gatsbyjs.org is ~51mb. Perhaps you've done quite a few builds now and accumulated some cruft? Gatsby deliberately doesn't delete anything on builds other than HTML as keeping old files around can be handy as someone can leave a site open and still be requesting resources from many builds ago. |
Thanks @KyleAMathews :) good to know I'm not too far off but I only built for the first time last night 🤔 I had a bunch of errors that I fixed so have probably tried to build about 10-15 times whilst fixing them. Would that be causing it? What's the recommended way to clear out the cruft as this is a brand new site so we don't have to worry about old resources being requested. |
Just delete the public directory.
…On Tue, Nov 14, 2017, 11:43 PM Giles Butler ***@***.***> wrote:
Thanks @KyleAMathews <https://github.com/kyleamathews> :) good to know
I'm not too far off but I only built for the first time last night 🤔 I
had a bunch of errors that I fixed so have probably tried to build about
10-15 times whilst fixing them. Would that be causing it? What's the
recommended way to clear out the cruft as this is a brand new site so we
don't have to worry about old resources being requested.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2923 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEVh4xv7i40wrE_qVnfGKxhl_gsuUxgks5s2pYHgaJpZM4QeZ_8>
.
|
@KyleAMathews too simple 😂 |
@KyleAMathews what should be the size the Is there a way to reduce this size? Less image versions maybe? |
It's 100% site dependent. You can run something like |
Hi Guys,
My public folder came out at 83mb! Is it normal for a Gatsby project to be so large? Is there anything I can do to bring that down as the upload to S3 is pretty slow.
I don't have any images in the site apart from a few tiny SVG files. Everything else is just code so it feels like something isn't quite right.
Any ideas?
Thanks
The text was updated successfully, but these errors were encountered: