maizzle / framework

Quickly build HTML emails with Tailwind CSS.
https://maizzle.com
MIT License
1.2k stars 48 forks source link

5.x: received empty string in local dev #1323

Open cossssmin opened 1 month ago

cossssmin commented 1 month ago

Sometimes when saving changes quickly while developing locally, it can happen that there is a delay between the file being saved to disk and Maizzle reading it and compiling the template, which can result in an empty string being received by the render() method in Maizzle and an error being thrown.

This could very likely be easily fixed by using awaitWriteFinish in chokidar:

Furthermore, in some cases some change events will be emitted while the file is being written.

https://github.com/paulmillr/chokidar#performance