Closed JSteunou closed 3 years ago
That's strange. In my company projects we're using the same babel config for lingui & bundling. Could you provide us a minimal repo, so we can debug?
We are using yarn (v1) workspace, with lingui on one workspace only for now, maybe that's very specific to our setup.
I will try to provide you a minimal repo as soon as I can.
In the meantime for those having the same issue, 2 workarounds:
['macros', {}, 'the-name-you-want']
and keeping only one config.@semoal I cannot help to think the root of the issue could be here https://github.com/lingui/js-lingui/blob/main/packages/cli/src/api/extractors/babel.ts#L33
no time to make a minimal repo today sorry :(
Describe the bug
Using webpack to bundle, I have a babel config for build and I though to be able to use the same configuration for linguijs extraction configuration. But there is an issue with babel macros plugin loaded twice and triggering a bunch of error with lingui cli extract. I had to make one config for lingui without macros, and one for webpack with macros.
To Reproduce
Step by step new project following documentation
Expected behavior
babel plugin macros should be added by user in its config and not automatically added by lingui with cli extract so there is no double, no errors
Additional context Add any other context about the problem here.
lingui --version
3.7.1npm list @babel/core
7.13.10.babelrc
) or framework you use (Create React App, Meteor, etc.)