Skip to content

Commit 487bd34

Browse files
committed
chore: stabilize file watcher
1 parent 23443a5 commit 487bd34

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tools/lib/common.mjs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,10 @@ export async function copyLocalizedFiles() {
109109
* @param {() => () => void} onChangeCallback
110110
*/
111111
export function watchLocalizedFiles(onChangeCallback) {
112-
const watcher = watch(localizedFilePatterns, { cwd: adevJaDir });
112+
const watcher = watch(localizedFilePatterns, {
113+
cwd: adevJaDir,
114+
awaitWriteFinish: true,
115+
});
113116
watcher.on('change', async (path) => {
114117
const changed = await copyLocalizedFile(path);
115118
if (changed) {

0 commit comments

Comments
 (0)