Skip to content

Commit de6e89e

Browse files
committed
feat: enable error overlay by default
1 parent 7827e34 commit de6e89e

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed

e2e/cases/server/overlay/rsbuild.config.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,4 @@ import { pluginReact } from '@rsbuild/plugin-react';
33

44
export default defineConfig({
55
plugins: [pluginReact()],
6-
dev: {
7-
client: {
8-
overlay: true
9-
}
10-
}
116
});

packages/core/src/provider/config.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ const getDefaultDevConfig = (): NormalizedDevConfig => ({
4040
liveReload: true,
4141
assetPrefix: DEFAULT_ASSET_PREFIX,
4242
startUrl: false,
43+
client: {
44+
overlay: true,
45+
},
4346
});
4447

4548
const getDefaultServerConfig = (): NormalizedServerConfig => ({

packages/document/docs/en/config/dev/client.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ type Client = {
1616
host?: string;
1717
/**
1818
* Shows overlay in the browser when there are compiler errors
19-
*
2019
* This feature requires the current browser version to support [Web Components](https://developer.mozilla.org/en-US/docs/Web/API/Web_components)
2120
*/
2221
overlay?: boolean;
@@ -32,7 +31,7 @@ const defaultConfig = {
3231
port: '',
3332
host: location.hostname,
3433
protocol: location.protocol === 'https:' ? 'wss' : 'ws',
35-
overlay: false,
34+
overlay: true,
3635
};
3736
```
3837

packages/document/docs/zh/config/dev/client.mdx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ type Client = {
1616
host?: string;
1717
/**
1818
* 当出现编译错误时,在浏览器中显示遮盖
19-
*
2019
* 该功能需要当前浏览器版本支持 [Web Components](https://developer.mozilla.org/en-US/docs/Web/API/Web_components)
2120
*/
2221
overlay?: boolean;
@@ -32,7 +31,7 @@ const defaultConfig = {
3231
port: '',
3332
host: location.hostname,
3433
protocol: location.protocol === 'https:' ? 'wss' : 'ws',
35-
overlay: false,
34+
overlay: true,
3635
};
3736
```
3837

0 commit comments

Comments
 (0)