Nuxt Deploy: old state.js content (caching problem)

Hi there

I have nuxt 2 running for a page where we do the following on netlify:

  1. fetch content from an API and save all content into data json files
  2. run $ nuxt generate to pregenerate a certain amount of static pages

Now we seem to have a problem because some pages store (_nuxt/…/state.js) is not regenerated during that process if we don’t deploy with the option to delete the cache on netlify.

So for example we publish a page once. It fetches the newest data, saves this into a data json. Then we run nuxt generate and generate that page. During that process the vuex store loads some global data into the store (which is then saved by nuxt next to a payload.js into a state.js.

Now when redeployed, the new content is properly fetched but the $ nuxt gerenate does not update the data in the state.js .

First: what is happening there? Why does netlify think the data has not changed?
Second: How can we force netlify to regenerate that data, or even better: how can we make netlify make the correct decision whether to update that state.js or not?

Thanks a lot in advance.
I would be happy to provide more detail, if necessary.

but only working on the main domain:

Hey @phantom,

This doesn’t look like a typical setup to me. Is there a repo we can check?