Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug After installing the npm packages, creating a lingui.config.js and trying to use the Trans macro in a component like so:
lingui.config.js
import { Trans } from '@lingui/macro' export default function Test() { return (<Trans>testing</Trans>) }
compilation errors out with:
error - ./node_modules/@lingui/conf/index.js:22:0 Module not found: Can't resolve 'fs' Import trace for requested module: ./node_modules/@lingui/macro/index.js ./src/components/Test.tsx ...
I've seen solutions mentioning adding the babel plugin, but Next.js 12 doesn't use Babel anymore.
Can I get the macros to work or should I fallback to the React Lingui components?
The text was updated successfully, but these errors were encountered:
Lingui depend exclusively of Babel and his macros. Until nextjs with SWC doesn’t offer a way of parsing AST we can’t do much here. Sorry Ps: nextjs still uses babel if you provide a babelrc
Sorry, something went wrong.
No branches or pull requests
Describe the bug
After installing the npm packages, creating a
lingui.config.jsand trying to use the Trans macro in a component like so:compilation errors out with:
I've seen solutions mentioning adding the babel plugin, but Next.js 12 doesn't use Babel anymore.
Can I get the macros to work or should I fallback to the React Lingui components?
The text was updated successfully, but these errors were encountered: