Skip to content

Commit

Permalink
docs(swc-plugin): add compatibility note (#1688)
Browse files Browse the repository at this point in the history
  • Loading branch information
timofei-iatsenko authored Jun 6, 2023
1 parent f5ada23 commit cf16165
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions website/docs/ref/swc-plugin.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@

If you're using SWC in your project, you can opt for the `@lingui/swc-plugin`. This plugin, designed for SWC, is a Rust version of [LinguiJS Macro](/docs/ref/macro.md).

## SWC Compatibility

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/swc-plugin` to match compatible `@swc/core` version.

For more information on compatibility, please refer to the [Compatibility section](https://github.com/lingui/swc-plugin#compatibility).

## Installation

Install `@lingui/swc-plugin` as a development dependency:
Expand Down Expand Up @@ -58,8 +66,12 @@ const nextConfig = {
module.exports = nextConfig;
```

## Further reading
## Examples

- [React with Vite and SWC](https://github.com/lingui/js-lingui/tree/main/examples/vite-project-react-swc)
- [Next.js with SWC](https://github.com/lingui/js-lingui/tree/main/examples/nextjs-swc)

## Links

- [NextJS 13 Example](https://github.com/lingui/swc-plugin/tree/main/examples/nextjs-13)
- [GitHub Repository](https://github.com/lingui/swc-plugin)
- [NPM Package](https://www.npmjs.com/package/@lingui/swc-plugin)

1 comment on commit cf16165

@vercel
Copy link

@vercel vercel bot commented on cf16165 Jun 6, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.