Closed ervasive closed 4 years ago
Thanks for reporting! We'll take a look asap.
Ok, @longlho after updating to 6.1.0 I ended up with 408 extra files which I don't need. What I did was to update the library and start my project in development.
I don't this this was the intended behavior. There are files created for each and every js file I have in my entire project structure, even for files that are just libraries, utilities etc...
@paulincai should be fixed in latest version
I've updated the dependency in the codesandbox example to the latest version and unfortunately, it still keeps non-existent (stale) "descriptors" for me in the messages file with v6.2.0 🤷
NVM, just noticed the new option Thank you for fixing the issue
Which package? babel-plugin-react-intl
Describe the bug Let's say we have the following module (React component):
When we update the
FormattedMessage
props,babel-plugin-react-intl
updates (re-extracts) its values to a messages file (as intended):But if we update the module to the state when it doesn't have any "descriptors" in it, the messages file won't be updated and will contain stale values (instead of being empty):
To Reproduce I have prepared a codesandbox example running gatsby project.
babel-plugin-react-intl
is enabled and configured ingatsby-node.js
fileFormattedMessage
component is defined withinsrc/pages/index.js
messages
directorySteps to reproduce the behavior:
src/pages/index.js
FormattedMessage
propsmessages/src/pages/index.js
(it should reflect the updated values)FormattedMessage
, so the module does not contain anyExpected behavior The messages file should be empty or contain an empty array