SWC Plugin support is still experimental. Semver backwards compatibility between different @swc/core versions is not guaranteed.
Therefore, you need to select an appropriate version of the Lingui plugin to match compatible @swc/core version.
For more information on compatibility, please refer to the Compatibility section.
❗️Note
The version of @swc/core is specified within the @vitejs/plugin-react-swc package.
To ensure that the resolved version of @swc/core is one of the supported versions, this example utilizes the resolutions field in the package.json file, which is supported by Yarn:
"resolutions": {
"@swc/core": "1.3.56"
},First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm devOpen http://localhost:5173 with your browser to see the result.
Extract messages from sourcecode:
npm run lingui:extract
# or
yarn lingui:extract
# or
pnpm lingui:extract