ttag-org / ttag

:orange_book: simple approach for javascript localization
https://ttag.js.org/
MIT License
345 stars 43 forks source link

Make extract threadsafe #174

Open AlexMost opened 5 years ago

AlexMost commented 5 years ago

For now, if you are running babel-plugin-ttag with extract options with happypack or thread-loader it can produce incorrect .po file, because multiple threads are trying to modify the same file. We should fix that.

Possible solutions:

  1. Lock file https://github.com/moxystudio/node-proper-lockfile.
  2. Create a separate .po file per thread and merge it on each write.