We can only research the same time hosted two places. In this case, you are comparing two different sites. They are not identical and it would seem the site at Netlify is not optimized:
The Nginx hosted instance at the custom domain sends an HTML file initial which is 80449 bytes:
The site at Netlify is over seven times larger than the site on Nginx which explains a great deal of the difference.
βWhy do your two sites differ?β would be the next question. Would be willing you tell us more about how you created both sites? Does the Nginx hosted site use server-side rendering for example?
Gee that is some amazing insight @luke .Thank you. For some reason the npm run generate command on netlify creates a dist folder which is over 17mb in size. If i run the same command on my computer is only 1.4mb i think i am using the same node version as netlify (v12.18.0). Do you have any ideas? Maybe Netlify is using Yarn Install instead of Npm install? How can i tell? I remember telling netlify to run npm run generate to create the dist folder, but how can i know if netlify is running npm install or yarn install? That might be the difference? What else?
I was having a similar issue on a different project, it was solved by removing a folder from the .gitignore file, so it was added to github and therefore to netlify. But on this particular project, i donβt know yet.
Ok iβm beginning to understand, i just read this:
" Starting today, if you deploy a site that includes a yarn.lock file in the base of the repository, weβll use Yarn to install dependencies. Weβll do this automatically, without you having to change any configuration options."
So yeah, i gotta get rid of the yarn.lock Thanks @luke