jlengstorf / netlify-plugin-gatsby-cache

185 stars 21 forks source link

specify alternate cache location #16

Closed davidosomething closed 4 years ago

davidosomething commented 4 years ago

The typical build cache location (/.cache) is not in the publish location (/public) https://www.gatsbyjs.org/docs/gatsby-project-structure/

how might one configure this?

jlengstorf commented 4 years ago

@davidosomething this isn't something Gatsby allows to be configured, and you don't need to publish .cache — it's a build artifact, but not used on the built site

can you say a little more about what you're trying to accomplish? thanks!

davidosomething commented 4 years ago

sorry the issue was this: i had the publish directory set in netlify via web: image

but not in my netlify.toml. it MUST be in netlify.toml

[build]
  publish = "public"

to correctly receive the correct PUBLISH_DIR env var (i got it working)

jlengstorf commented 4 years ago

ah, great — this is a good note

thanks for following up!