Skip to content

Commit 0498e4a

Browse files
committed
docs: update Rspack links
1 parent 04e39e0 commit 0498e4a

File tree

3 files changed

+13
-18
lines changed

3 files changed

+13
-18
lines changed

README.md

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
<picture>
2-
<source media="(prefers-color-scheme: dark)" srcset="https://assets.rspack.dev/rspack/rspack-banner-plain-dark.png">
3-
<img alt="Rspack Banner" src="https://assets.rspack.dev/rspack/rspack-banner-plain-light.png">
4-
</picture>
5-
61
# @rspack/plugin-react-refresh
72

83
<p>
@@ -102,12 +97,12 @@ Compared to the previous approach, this method decouples the React Fast Refresh
10297

10398
### test
10499

105-
- Type: [Rspack.RuleSetCondition](https://rspack.dev/config/module#condition)
100+
- Type: [Rspack.RuleSetCondition](https://rspack.rs/config/module-rules#condition)
106101
- Default: `undefined`
107102

108103
Specifies which files should be processed by the React Refresh loader. This option is passed to the `builtin:react-refresh-loader` as the `rule.test` condition.
109104

110-
Works identically to Rspack's [rule.test](https://rspack.dev/config/module#ruletest) option.
105+
Works identically to Rspack's [rule.test](https://rspack.rs/config/module-rules#rulestest) option.
111106

112107
```js
113108
new ReactRefreshPlugin({
@@ -117,14 +112,14 @@ new ReactRefreshPlugin({
117112

118113
### include
119114

120-
- Type: [Rspack.RuleSetCondition](https://rspack.dev/config/module#condition)
115+
- Type: [Rspack.RuleSetCondition](https://rspack.rs/config/module-rules#condition)
121116
- Default: `/\.([cm]js|[jt]sx?|flow)$/i`
122117

123118
Explicitly includes files to be processed by the React Refresh loader. This option is passed to the `builtin:react-refresh-loader` as the `rule.include` condition.
124119

125120
Use this to limit processing to specific directories or file patterns.
126121

127-
Works identically to Rspack's [rule.include](https://rspack.dev/config/module#ruleinclude) option.
122+
Works identically to Rspack's [rule.include](https://rspack.rs/config/module-rules#rulesinclude) option.
128123

129124
```js
130125
new ReactRefreshPlugin({
@@ -134,10 +129,10 @@ new ReactRefreshPlugin({
134129

135130
### exclude
136131

137-
- Type: [Rspack.RuleSetCondition](https://rspack.dev/config/module#condition)
132+
- Type: [Rspack.RuleSetCondition](https://rspack.rs/config/module-rules#condition)
138133
- Default: `/node_modules/`
139134

140-
Exclude files from being processed by the plugin. The value is the same as the [rule.exclude](https://rspack.dev/config/module#ruleexclude) option in Rspack.
135+
Exclude files from being processed by the plugin. The value is the same as the [rule.exclude](https://rspack.rs/config/module-rules#rulesexclude) option in Rspack.
141136

142137
```js
143138
new ReactRefreshPlugin({
@@ -147,10 +142,10 @@ new ReactRefreshPlugin({
147142

148143
### resourceQuery
149144

150-
- Type: [Rspack.RuleSetCondition](https://rspack.dev/config/module#condition)
145+
- Type: [Rspack.RuleSetCondition](https://rspack.rs/config/module-rules#condition)
151146
- Default: `undefined`
152147

153-
Can be used to exclude certain resources from being processed by the plugin by the resource query. The value is the same as the [rule.resourceQuery](https://rspack.dev/config/module#ruleresourcequery) option in Rspack.
148+
Can be used to exclude certain resources from being processed by the plugin by the resource query. The value is the same as the [rule.resourceQuery](https://rspack.rs/config/module-rules#rulesresourcequery) option in Rspack.
154149

155150
For example, to exclude all resources with the `raw` query, such as `import rawTs from './ReactComponent.ts?raw';`, use the following:
156151

src/options.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export type PluginOptions = {
1717
* Specifies which files should be processed by the React Refresh loader.
1818
* This option is passed to the `builtin:react-refresh-loader` as the `rule.test` condition.
1919
* Works identically to Rspack's `rule.test` option.
20-
* @see https://rspack.dev/config/module#ruletest
20+
* @see https://rspack.rs/config/module-rules#rulestest
2121
*/
2222
test?: RuleSetCondition;
2323
/**
@@ -26,20 +26,20 @@ export type PluginOptions = {
2626
* Use this to limit processing to specific directories or file patterns.
2727
* Works identically to Rspack's `rule.include` option.
2828
* @default /\.([cm]js|[jt]sx?|flow)$/i
29-
* @see https://rspack.dev/config/module#ruleinclude
29+
* @see https://rspack.rs/config/module-rules#rulesinclude
3030
*/
3131
include?: RuleSetCondition | null;
3232
/**
3333
* Exclude files from being processed by the plugin.
3434
* The value is the same as the `rule.exclude` option in Rspack.
3535
* @default /node_modules/
36-
* @see https://rspack.dev/config/module#ruleexclude
36+
* @see https://rspack.rs/config/module-rules#rulesexclude
3737
*/
3838
exclude?: RuleSetCondition | null;
3939
/**
4040
* Can be used to exclude certain resources from being processed by
4141
* the plugin by the resource query.
42-
* @see https://rspack.dev/config/module#ruleresourcequery
42+
* @see https://rspack.rs/config/module-rules#rulesresourcequery
4343
*
4444
* @example
4545
* To exclude all resources with the `raw` query, such as

src/sockets/utils/getSocketUrlParts.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ export default function getSocketUrlParts(
123123
'[React Refresh] Failed to get an URL for the socket connection.',
124124
"This usually means that the current executed script doesn't have a `src` attribute set.",
125125
'You should either specify the socket path parameters under the `devServer` key in your Rspack config, or use the `overlay` option.',
126-
'https://www.rspack.dev/guide/tech/react#fast-refresh',
126+
'https://rspack.rs/guide/tech/react#fast-refresh',
127127
].join('\n'),
128128
);
129129
}

0 commit comments

Comments
 (0)