@bleedingdev/modern-js-main-doc 3.9.3-ultramodern.15 → 3.9.3-ultramodern.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/docs/en/components/default-browserslist.mdx +4 -4
- package/docs/en/configure/app/output/override-browserslist.mdx +3 -3
- package/docs/en/guides/advanced-features/compatibility.mdx +3 -3
- package/docs/en/guides/advanced-features/page-performance/optimize-bundle.mdx +3 -3
- package/docs/en/guides/get-started/ultramodern.mdx +1 -1
- package/docs/zh/components/default-browserslist.mdx +4 -4
- package/docs/zh/configure/app/output/override-browserslist.mdx +3 -3
- package/docs/zh/guides/advanced-features/compatibility.mdx +3 -3
- package/docs/zh/guides/advanced-features/page-performance/optimize-bundle.mdx +3 -3
- package/docs/zh/guides/get-started/ultramodern.mdx +1 -1
- package/package.json +3 -3
|
@@ -9,9 +9,9 @@ title: overrideBrowserslist
|
|
|
9
9
|
|
|
10
10
|
```ts
|
|
11
11
|
const defaultBrowserListMap: Record<RsbuildTarget, string[]> = {
|
|
12
|
-
web: ['chrome >=
|
|
13
|
-
node: ['node >=
|
|
14
|
-
'web-worker': ['chrome >=
|
|
12
|
+
web: ['chrome >= 144', 'edge >= 144', 'firefox >= 147', 'safari >= 27'],
|
|
13
|
+
node: ['node >= 16'],
|
|
14
|
+
'web-worker': ['chrome >= 144', 'edge >= 144', 'firefox >= 147', 'safari >= 27'],
|
|
15
15
|
};
|
|
16
16
|
```
|
|
17
17
|
|
|
@@ -12,7 +12,7 @@ Modern.js supports three ways to set the range of browsers that a web applicatio
|
|
|
12
12
|
|
|
13
13
|
Modern.js supports setting the range of browsers that a web application needs to support. You can set the [Browserslist](https://browsersl.ist/) values in the `.browserslistrc` file.
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
UltraModern.js defaults to Chrome 144+, Edge 144+, Firefox 147+ and Safari 27+. These targets apply to JavaScript compilation and CSS processing when the project does not specify its own browser targets. To set the targets explicitly, add a `.browserslistrc` file with:
|
|
16
16
|
|
|
17
17
|
import DefaultBrowserslist from '@site-docs/components/default-browserslist';
|
|
18
18
|
|
|
@@ -28,7 +28,7 @@ You can also configure browserslist by setting the `browserslist` field in the `
|
|
|
28
28
|
```json title="package.json"
|
|
29
29
|
{
|
|
30
30
|
"browserslist": [
|
|
31
|
-
"chrome >=
|
|
31
|
+
"chrome >= 144"
|
|
32
32
|
// Other browser configurations...
|
|
33
33
|
]
|
|
34
34
|
}
|
|
@@ -42,7 +42,7 @@ You can also configure browserslist by setting the [`output.overrideBrowserslist
|
|
|
42
42
|
export default {
|
|
43
43
|
output: {
|
|
44
44
|
overrideBrowserslist: [
|
|
45
|
-
'chrome >=
|
|
45
|
+
'chrome >= 144',
|
|
46
46
|
// Other browser configurations...
|
|
47
47
|
],
|
|
48
48
|
},
|
|
@@ -49,13 +49,13 @@ Modern.js will compile the code according to the project's Browserslist config,
|
|
|
49
49
|
Modern.js's default [`output.overrideBrowserslist`](/configure/app/output/override-browserslist.html) config is:
|
|
50
50
|
|
|
51
51
|
```js
|
|
52
|
-
['chrome >=
|
|
52
|
+
['chrome >= 144', 'edge >= 144', 'firefox >= 147', 'safari >= 27'];
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
For example, if you only need to be compatible with browsers
|
|
55
|
+
For example, if you only need to be compatible with browsers Chrome 150 and later, you can change it to:
|
|
56
56
|
|
|
57
57
|
```js
|
|
58
|
-
['
|
|
58
|
+
['chrome >= 150'];
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
:::tip
|
|
@@ -98,7 +98,7 @@ React applications use TanStack Redact on both the client and the server
|
|
|
98
98
|
runtime while keeping normal `react` / `react-dom` imports, JSX and types.
|
|
99
99
|
Upgrading the framework enables it without application edits:
|
|
100
100
|
`@modern-js/ultramodern-app-tools` supplies exact `@tanstack/redact` (the reviewed
|
|
101
|
-
`@bleedingdev/tanstack-redact@0.2.
|
|
101
|
+
`@bleedingdev/tanstack-redact@0.2.2` build) and `rsbuild-redact-plugin@0.1.0`
|
|
102
102
|
dependencies and resolves the runtime from its own installation. Do not install either package or register a Redact
|
|
103
103
|
plugin in the app. Keep the generated React and React DOM pins: they provide the
|
|
104
104
|
real React runtime for opt-out and RSC applications. RSC applications stay on
|
|
@@ -9,9 +9,9 @@ title: overrideBrowserslist
|
|
|
9
9
|
|
|
10
10
|
```ts
|
|
11
11
|
const defaultBrowserListMap: Record<RsbuildTarget, string[]> = {
|
|
12
|
-
web: ['chrome >=
|
|
13
|
-
node: ['node >=
|
|
14
|
-
'web-worker': ['chrome >=
|
|
12
|
+
web: ['chrome >= 144', 'edge >= 144', 'firefox >= 147', 'safari >= 27'],
|
|
13
|
+
node: ['node >= 16'],
|
|
14
|
+
'web-worker': ['chrome >= 144', 'edge >= 144', 'firefox >= 147', 'safari >= 27'],
|
|
15
15
|
};
|
|
16
16
|
```
|
|
17
17
|
|
|
@@ -12,7 +12,7 @@ Modern.js 支持通过三种方式来设置 Web 应用需要兼容的浏览器
|
|
|
12
12
|
|
|
13
13
|
Modern.js 支持设置 Web 应用需要兼容的浏览器范围,你可以在 `.browserslistrc` 文件里设置 [Browserslist](https://browsersl.ist/) 的值。
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
UltraModern.js 默认支持 Chrome 144+、Edge 144+、Firefox 147+ 和 Safari 27+。项目未指定浏览器范围时,JavaScript 编译和 CSS 处理会使用这些目标。要显式配置目标,可以添加以下 `.browserslistrc` 文件:
|
|
16
16
|
|
|
17
17
|
import DefaultBrowserslist from '@site-docs/components/default-browserslist';
|
|
18
18
|
|
|
@@ -27,7 +27,7 @@ import DefaultBrowserslist from '@site-docs/components/default-browserslist';
|
|
|
27
27
|
```json title="package.json"
|
|
28
28
|
{
|
|
29
29
|
"browserslist": [
|
|
30
|
-
"chrome >=
|
|
30
|
+
"chrome >= 144"
|
|
31
31
|
// 其他浏览器的配置...
|
|
32
32
|
]
|
|
33
33
|
}
|
|
@@ -41,7 +41,7 @@ import DefaultBrowserslist from '@site-docs/components/default-browserslist';
|
|
|
41
41
|
export default {
|
|
42
42
|
output: {
|
|
43
43
|
overrideBrowserslist: [
|
|
44
|
-
'chrome >=
|
|
44
|
+
'chrome >= 144',
|
|
45
45
|
// 其他浏览器的配置...
|
|
46
46
|
],
|
|
47
47
|
},
|
|
@@ -49,13 +49,13 @@ Modern.js 会根据项目的 Browserslist 配置范围进行代码编译,并
|
|
|
49
49
|
Modern.js 默认的 [`output.overrideBrowserslist`](/configure/app/output/override-browserslist.html) 配置为:
|
|
50
50
|
|
|
51
51
|
```js
|
|
52
|
-
['chrome >=
|
|
52
|
+
['chrome >= 144', 'edge >= 144', 'firefox >= 147', 'safari >= 27'];
|
|
53
53
|
```
|
|
54
54
|
|
|
55
|
-
比如只兼容 Chrome
|
|
55
|
+
比如只兼容 Chrome 150 以上的浏览器,可以改成:
|
|
56
56
|
|
|
57
57
|
```js
|
|
58
|
-
['
|
|
58
|
+
['chrome >= 150'];
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
:::tip
|
|
@@ -92,7 +92,7 @@ hydration 和框架管理的文件路由。使用 Node 26.7.0 或更新版本。
|
|
|
92
92
|
React 应用默认在客户端与服务端(Node SSR 和 Cloudflare workerd SSR)使用
|
|
93
93
|
TanStack Redact。它提供轻量的 React 19 兼容运行时,保留常规的 `react` /
|
|
94
94
|
`react-dom` 导入、JSX 和类型。升级框架即可启用,无需修改应用:
|
|
95
|
-
`@modern-js/ultramodern-app-tools` 自带精确依赖 `@tanstack/redact`(已审查的 `@bleedingdev/tanstack-redact@0.2.
|
|
95
|
+
`@modern-js/ultramodern-app-tools` 自带精确依赖 `@tanstack/redact`(已审查的 `@bleedingdev/tanstack-redact@0.2.2`)
|
|
96
96
|
和 `rsbuild-redact-plugin@0.1.0`,并从框架自身的安装位置解析运行时。
|
|
97
97
|
不要在应用中安装这两个包或注册 Redact 插件。保留生成的 React 和 React DOM
|
|
98
98
|
版本锁定,它们为显式退出和 RSC 应用提供真正的 React 运行时。
|
package/package.json
CHANGED
|
@@ -19,13 +19,13 @@
|
|
|
19
19
|
"modern.js",
|
|
20
20
|
"ultramodern.js"
|
|
21
21
|
],
|
|
22
|
-
"version": "3.9.3-ultramodern.
|
|
22
|
+
"version": "3.9.3-ultramodern.17",
|
|
23
23
|
"publishConfig": {
|
|
24
24
|
"access": "public"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@modern-js/sandpack-react": "npm:@bleedingdev/modern-js-sandpack-react@3.9.3-ultramodern.
|
|
28
|
-
"@modern-js/ultramodern-sandpack-profile": "npm:@bleedingdev/modern-js-ultramodern-sandpack-profile@3.9.3-ultramodern.
|
|
27
|
+
"@modern-js/sandpack-react": "npm:@bleedingdev/modern-js-sandpack-react@3.9.3-ultramodern.17",
|
|
28
|
+
"@modern-js/ultramodern-sandpack-profile": "npm:@bleedingdev/modern-js-ultramodern-sandpack-profile@3.9.3-ultramodern.17",
|
|
29
29
|
"mermaid": "^12.2.0"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|