You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+55Lines changed: 55 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -109,6 +109,61 @@ new ReactRefreshPlugin({
109
109
});
110
110
```
111
111
112
+
### forceEnable
113
+
114
+
- Type: `boolean`
115
+
- Default: `false`
116
+
117
+
Whether to force enable the plugin.
118
+
119
+
By default, the plugin will not be enabled in non-development environments. If you want to force enable the plugin, you can set this option to `true`.
120
+
121
+
```js
122
+
newReactRefreshPlugin({
123
+
forceEnable:true,
124
+
});
125
+
```
126
+
127
+
It is useful if you want to:
128
+
129
+
- Use the plugin in production.
130
+
- Use the plugin with the `none` mode without setting `NODE_ENV`.
131
+
- Use the plugin in environments we do not support, such as `electron-prerender` (**WARNING: Proceed at your own risk**).
132
+
133
+
### library
134
+
135
+
- Type: `string`
136
+
- Default: `output.uniqueName || output.library`
137
+
138
+
Sets a namespace for the React Refresh runtime.
139
+
140
+
It is most useful when multiple instances of React Refresh is running together simultaneously.
141
+
142
+
### overlay
143
+
144
+
- Type: `boolean | OverlayOptions`
145
+
- Default: `false`
146
+
147
+
Modify the behavior of the error overlay.
148
+
149
+
- Enable the error overlay:
150
+
151
+
```js
152
+
newReactRefreshPlugin({
153
+
overlay:true,
154
+
});
155
+
```
156
+
157
+
- Configure the error overlay:
158
+
159
+
```js
160
+
newReactRefreshPlugin({
161
+
overlay: {
162
+
// ...
163
+
},
164
+
});
165
+
```
166
+
112
167
## Credits
113
168
114
169
Thanks to the [react-refresh-webpack-plugin](https://github.com/pmmmwh/react-refresh-webpack-plugin) created by [@pmmmwh](https://github.com/pmmmwh), which inspires implement this plugin.
0 commit comments