|
const formatted: Record<string, string> = {}; |
|
for (const [k, v] of Object.entries(mod.default)) { |
|
formatted[k] = prettyJSON(JSON.parse(v)); |
|
} |
|
setFiles(formatted); |
On large token files (or large numbers thereof) this rewriting with reformatted json appears to trigger a race condition which causes the parseJSON in resolverFromFiles to barf on malformed JSON.
dtcg-resolver-playground/src/main.tsx
Lines 68 to 72 in 07e9acf
On large token files (or large numbers thereof) this rewriting with reformatted json appears to trigger a race condition which causes the
parseJSONinresolverFromFilesto barf on malformed JSON.