Webpack build is failing when specifying the count property in a t call. If I remove count then the strings get extracted correctly. When using webpack devserver+HMR webpack gets stuck in an infinite error loop.
The language code shown in the error message is not always en-US, the other common code I see is my but it's not consistent.
Error: /Users/....../MyComponent.js: Unknown locale 'en-US'.
at computeDerivedKeys (/Users/....../node_modules/babel-plugin-i18next-extract/index.js:1798:32)
at /Users/....../node_modules/babel-plugin-i18next-extract/index.js:1970:103
at Array.reduce ()
at PluginPass.post (/Users/....../node_modules/babel-plugin-i18next-extract/index.js:1970:56)
at transformFile (/Users/....../node_modules/@babel/core/lib/transformation/index.js:85:27)
at transformFile.next ()
at run (/Users/....../node_modules/@babel/core/lib/transformation/index.js:24:12)
at run.next ()
at transform (/Users/....../node_modules/@babel/core/lib/transform.js:22:41)
at transform.next ()
at step (/Users/....../node_modules/gensync/index.js:261:32)
at /Users/....../node_modules/gensync/index.js:273:13
at async.call.result.err.err (/Users/....../node_modules/gensync/index.js:223:11)
How to reproduce
Error occurs when I add a count property to the t options.
Describe the bug
Webpack build is failing when specifying the
count
property in at
call. If I removecount
then the strings get extracted correctly. When using webpack devserver+HMR webpack gets stuck in an infinite error loop.The language code shown in the error message is not always
en-US
, the other common code I see ismy
but it's not consistent.Error: /Users/....../MyComponent.js: Unknown locale 'en-US'. at computeDerivedKeys (/Users/....../node_modules/babel-plugin-i18next-extract/index.js:1798:32) at /Users/....../node_modules/babel-plugin-i18next-extract/index.js:1970:103 at Array.reduce ()
at PluginPass.post (/Users/....../node_modules/babel-plugin-i18next-extract/index.js:1970:56)
at transformFile (/Users/....../node_modules/@babel/core/lib/transformation/index.js:85:27)
at transformFile.next ()
at run (/Users/....../node_modules/@babel/core/lib/transformation/index.js:24:12)
at run.next ()
at transform (/Users/....../node_modules/@babel/core/lib/transform.js:22:41)
at transform.next ()
at step (/Users/....../node_modules/gensync/index.js:261:32)
at /Users/....../node_modules/gensync/index.js:273:13
at async.call.result.err.err (/Users/....../node_modules/gensync/index.js:223:11)
How to reproduce
Error occurs when I add a
count
property to thet
options.Babel configuration:
Reproduction:
Your environment
I'm note sure if there is something I'm missing in terms of extra modules or configuration required for plurals to work?