Skip to content

Commit d22c9e2

Browse files
tweak(frontend): improve Nuxt build state generation logging and caching (#4133)
1 parent e31197f commit d22c9e2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

apps/frontend/nuxt.config.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,8 +143,13 @@ export default defineNuxtConfig({
143143
state.lastGenerated &&
144144
new Date(state.lastGenerated).getTime() + TTL > new Date().getTime() &&
145145
// ...but only if the API URL is the same
146-
state.apiUrl === API_URL
146+
state.apiUrl === API_URL &&
147+
// ...and if no errors were caught during the last generation
148+
(state.errors ?? []).length === 0
147149
) {
150+
console.log(
151+
"Tags already recently generated. Delete apps/frontend/generated/state.json to force regeneration.",
152+
);
148153
return;
149154
}
150155

0 commit comments

Comments
 (0)