Skip to content

Commit

Permalink
docs: update relay example to use SWC plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
chenjiahan committed Jun 24, 2024
1 parent a2b07b2 commit ca2bd63
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
8 changes: 5 additions & 3 deletions website/docs/en/config/tools/swc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,14 @@ Example of enabling the Relay support using the `builtin:swc-loader`:
export default {
tools: {
swc: {
rspackExperiments: {
relay: true,
jsc: {
experimental: {
plugins: [['@swc/plugin-relay', {}]],
},
},
},
},
};
```

For more options, please refer to [Rspack - rspackExperiments.relay](https://rspack.dev/guide/features/builtin-swc-loader#rspackexperimentsrelay).
For more options, please refer to [@swc/plugin-relay](https://www.npmjs.com/package/@swc/plugin-relay).
8 changes: 5 additions & 3 deletions website/docs/zh/config/tools/swc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -114,12 +114,14 @@ export default {
export default {
tools: {
swc: {
rspackExperiments: {
relay: true,
jsc: {
experimental: {
plugins: [['@swc/plugin-relay', {}]],
},
},
},
},
};
```

更多选项可参考 [Rspack - rspackExperiments.relay](https://rspack.dev/zh/guide/features/builtin-swc-loader#rspackexperimentsrelay)
更多选项可参考 [@swc/plugin-relay](https://www.npmjs.com/package/@swc/plugin-relay)

0 comments on commit ca2bd63

Please sign in to comment.