File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -83,6 +83,32 @@ module.exports = {
8383
8484## Options
8585
86+ ### include
87+
88+ - Type: [ Rspack.RuleSetCondition] ( https://rspack.dev/config/module#condition )
89+ - Default: ` /\.([jt]sx?)$/ `
90+
91+ Include files to be processed by the plugin. The value is the same as the ` rule.test ` option in Rspack.
92+
93+ ``` js
94+ new PreactRefreshPlugin ({
95+ include: [/ \. jsx$ / , / \. tsx$ / ],
96+ });
97+ ```
98+
99+ ### exclude
100+
101+ - Type: [ Rspack.RuleSetCondition] ( https://rspack.dev/config/module#condition )
102+ - Default: ` /node_modules/ `
103+
104+ Exclude files from being processed by the plugin. The value is the same as the ` rule.exclude ` option in Rspack.
105+
106+ ``` js
107+ new PreactRefreshPlugin ({
108+ exclude: [/ node_modules/ , / some-other-module/ ],
109+ });
110+ ```
111+
86112### preactPath
87113
88114- Type: ` string `
Original file line number Diff line number Diff line change 11import fs from 'node:fs' ;
22import { dirname } from 'node:path' ;
3- import type { Compiler , RspackPluginInstance } from '@rspack/core' ;
3+ import type {
4+ Compiler ,
5+ RspackPluginInstance ,
6+ RuleSetCondition ,
7+ } from '@rspack/core' ;
48
59export interface IPreactRefreshRspackPluginOptions {
6- include ?: string | RegExp | ( string | RegExp ) [ ] | null ;
7- exclude ?: string | RegExp | ( string | RegExp ) [ ] | null ;
10+ /**
11+ * Include files to be processed by the plugin.
12+ * The value is the same as the `rule.test` option in Rspack.
13+ * @default /\.([jt]sx?)$/
14+ */
15+ include ?: RuleSetCondition | null ;
16+ /**
17+ * Exclude files from being processed by the plugin.
18+ * The value is the same as the `rule.exclude` option in Rspack.
19+ * @default /node_modules/
20+ */
21+ exclude ?: RuleSetCondition | null ;
22+ /**
23+ * Configure the error overlay.
24+ */
825 overlay ?: {
26+ /**
27+ * The module to use for the error overlay.
28+ */
929 module : string ;
1030 } ;
1131 /**
You can’t perform that action at this time.
0 commit comments