oedotme / generouted

Generated file-based routes for Vite
https://stackblitz.com/github.com/oedotme/generouted/tree/main/explorer
MIT License
1.02k stars 47 forks source link

Generated routes output is sometimes not fully written to disk before being processed #149

Closed timothympace closed 6 months ago

timothympace commented 6 months ago

Describe the Bug

generouted uses the buildStart hook from rollup to generate a routes file. Rollup's buildStart hook is compatible with async functions (generate in this case), but needs to return a promise in order for it to wait for any async work.

Rollup build hook docs buildStart docs

Fix provided in: https://github.com/oedotme/generouted/pull/148

Generouted Version

1.18.2

Your Example Website or App or Reproduction

Not a able to repro (race condition)

Steps to Reproduce the Bug or Issue

Not a able to repro (race condition)

Expected Behavior

Output file should be fully written to disk before moving on.

Screenshots or Videos

No response

Platform

Additional context

No response

oedotme commented 6 months ago

Released at v1.18.3