"cli extract" fails when I do not use macro and have no babel macro package installed
See original GitHub issueDescribe the bug
I’m using Next.js. I do not need macros, so I decided not to install @babel/macro etc. I did it because I want Next.js to use SWC.
To Reproduce
Create a minimal Next.js project.
Do not install anything related to macros.
Run yarn extract
.
Console logs gets lots of warnings - lingui-extract.js
tries to use babel-plugin-macros
.
Expected behavior
extract/compile should work without babel-plugin-macros
dependency.
Additional context
-
jsLingui version
3.13.2
-
Your Babel config (e.g.
.babelrc
) - Next.js; no custom babelrc config.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (2 by maintainers)
Top Results From Across the Web
lingui/js-lingui - Gitter
Hi all, I'm trying to get Lingui working in a new project again, but keep running into @lingui/macro: Cannot read property 'attributes' of...
Read more >Error with babel-macros when create npm package
But, if I install the library and use on my project shows the next error: MacroError: The macro you imported from "undefined" is...
Read more >@lingui/babel-plugin-transform-js | Yarn - Package Manager
@lingui/babel-plugin-transform-js. Babel plugin which transforms messages written using lingui-i18n functions to static ICU MessageFormat.
Read more >Tutorial - Internationalization of React apps - LinguiJS - JS.ORG
Follow setup guide either for projects using LinguiJS with Create React App or for ... If you're wondering what Babel macros are and...
Read more >How to set up internationalization in React using Lingui.js
Here's how to integrate Lingui.js with a React app and add internationalization capabilities to your application.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
What’s the idea behind automatically closing issues that are not rejected explicitly? If nobody can take care of it now, it does not mean the issue automagically becomes irrelevant or not actual. It is still actual.
This won’t get done ever. We use babel-plugin-macros for extracting the t``. Until SWC opens a way to interact with the AST code we CAN’T do nothing.