Gatsby .cache folder in AWS Amplify Console

时光总嘲笑我的痴心妄想 提交于 2019-12-10 23:48:33

问题


Recently I built a Gatsby project and deployed it on AWS Amplify using the Amplify Console and connecting my Bitbucket repo. The project grew and now it has to build 37 pages with a ton of images. I am using ‘gatsby-source-custom-api’ for the data extraction which offers image processing using ‘gatsby-image’. It also offers a way to specify if the images was changed therefore if not changed it uses the .cache to get it already optimized by the ‘gatsby-image’. Now the issue I face is that the .cache folder is not available between builds in AWS Amplify. Can it be stored somewhere or is there another way to use it? Now it takes a good 13 minutes to build and the major part is from image processing.


回答1:


You can store the .cache folder by defining it as part of the buildspec: https://docs.aws.amazon.com/amplify/latest/userguide/build-settings.html#yml-specification-syntax



来源:https://stackoverflow.com/questions/57025169/gatsby-cache-folder-in-aws-amplify-console

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!