@modern-js/main-doc 2.54.4 → 2.54.5
Sign up to get free protection for your applications and to get access to all the features.
@@ -123,19 +123,46 @@ When Rspack is enabled for building through dev / build, the current version of
|
|
123
123
|
|
124
124
|
You can override Rspack to a specific version using the capbilities provided by package managers such as pnpm, yarn, npm.
|
125
125
|
|
126
|
-
For example, if you are using pnpm, you can
|
126
|
+
For example, if you are using pnpm, you can override the Rspack version with `overrides`. Assume that the version of Rspack needs to be specified as 0.7.5:
|
127
127
|
|
128
128
|
```json title=package.json
|
129
129
|
{
|
130
130
|
"pnpm": {
|
131
131
|
"overrides": {
|
132
|
-
"@rspack/
|
133
|
-
"@rspack/
|
132
|
+
"@rspack/binding": "0.7.5",
|
133
|
+
"@rspack/core": "0.7.5",
|
134
|
+
"@rspack/plugin-react-refresh": "0.7.5"
|
134
135
|
}
|
135
136
|
}
|
136
137
|
}
|
137
138
|
```
|
138
139
|
|
140
|
+
If you need to use the nightly/canary version of Rspack, the package name of the nightly/canary version of Rspack will be released after adding the `-canary` suffix, and needs to be modified to:
|
141
|
+
|
142
|
+
```json title=package.json
|
143
|
+
{
|
144
|
+
"pnpm": {
|
145
|
+
"overrides": {
|
146
|
+
"@rspack/binding": "npm:@rspack/binding-canary@nightly",
|
147
|
+
"@rspack/core": "npm:@rspack/core-canary@nightly",
|
148
|
+
"@rspack/plugin-react-refresh": "npm:@rspack/plugin-react-refresh-canary@nightly"
|
149
|
+
},
|
150
|
+
"peerDependencyRules": {
|
151
|
+
"allowAny": [
|
152
|
+
"@rspack/*"
|
153
|
+
]
|
154
|
+
}
|
155
|
+
}
|
156
|
+
}
|
157
|
+
```
|
158
|
+
|
159
|
+
Rspack provides [install-rspack](https://github.com/rspack-contrib/install-rspack) tooling to quickly override versions:
|
160
|
+
|
161
|
+
```sh
|
162
|
+
npx install-rspack --version nightly # nightly npm tag
|
163
|
+
npx install-rspack --version 0.7.5-canary-d614005-20240625082730 # A specific canary version
|
164
|
+
```
|
165
|
+
|
139
166
|
:::tip What is Rspack Nightly Version
|
140
167
|
The Rspack nightly build fully replicates the full release build for catching errors early.
|
141
168
|
Usually it is available and any errors that arise will fixed promptly.
|
@@ -122,19 +122,46 @@ export default defineConfig<'rspack'>({
|
|
122
122
|
|
123
123
|
可以使用 pnpm / yarn / npm 等包管理工具自带的依赖升级功能来将 Rspack 强制升级到指定版本。
|
124
124
|
|
125
|
-
以 pnpm 为例,可通过 `overrides`
|
125
|
+
以 pnpm 为例,可通过 `overrides` 修改内置的 Rspack 版本。假设需要指定 Rspack 的版本为 0.7.5:
|
126
126
|
|
127
127
|
```json title=package.json
|
128
128
|
{
|
129
129
|
"pnpm": {
|
130
130
|
"overrides": {
|
131
|
-
"@rspack/
|
132
|
-
"@rspack/
|
131
|
+
"@rspack/binding": "0.7.5",
|
132
|
+
"@rspack/core": "0.7.5",
|
133
|
+
"@rspack/plugin-react-refresh": "0.7.5"
|
133
134
|
}
|
134
135
|
}
|
135
136
|
}
|
136
137
|
```
|
137
138
|
|
139
|
+
如果需要使用 Rspack 的 nightly/canary 版本,Rspack 的 nightly/canary 版本的包名会在增加 `-canary` 后缀之后发布,需要修改为:
|
140
|
+
|
141
|
+
```json title=package.json
|
142
|
+
{
|
143
|
+
"pnpm": {
|
144
|
+
"overrides": {
|
145
|
+
"@rspack/binding": "npm:@rspack/binding-canary@nightly",
|
146
|
+
"@rspack/core": "npm:@rspack/core-canary@nightly",
|
147
|
+
"@rspack/plugin-react-refresh": "npm:@rspack/plugin-react-refresh@nightly"
|
148
|
+
},
|
149
|
+
"peerDependencyRules": {
|
150
|
+
"allowAny": [
|
151
|
+
"@rspack/*"
|
152
|
+
]
|
153
|
+
}
|
154
|
+
}
|
155
|
+
}
|
156
|
+
```
|
157
|
+
|
158
|
+
Rspack 提供了 [install-rspack](https://github.com/rspack-contrib/install-rspack) 工具来快速修改 Rspack 版本:
|
159
|
+
|
160
|
+
```sh
|
161
|
+
npx install-rspack --version nightly # nightly npm tag
|
162
|
+
npx install-rspack --version 0.7.5-canary-d614005-20240625082730 # A specific canary version
|
163
|
+
```
|
164
|
+
|
138
165
|
:::tip Nightly 版本介绍
|
139
166
|
每天,Rspack 会自动构建基于最新代码的 nightly 版本,用于测试和及早发现错误。
|
140
167
|
通常情况下,这些版本是可用的。如果发现问题,我们会及时进行修复。但如果 Rspack 有一些 breaking change、需要 Modern.js 同步修改代码,那么我们建议等待下一个 Modern.js 版本再进行更新。
|
package/package.json
CHANGED
@@ -15,17 +15,17 @@
|
|
15
15
|
"modern",
|
16
16
|
"modern.js"
|
17
17
|
],
|
18
|
-
"version": "2.54.
|
18
|
+
"version": "2.54.5",
|
19
19
|
"publishConfig": {
|
20
20
|
"registry": "https://registry.npmjs.org/",
|
21
21
|
"access": "public",
|
22
22
|
"provenance": true
|
23
23
|
},
|
24
24
|
"dependencies": {
|
25
|
-
"@modern-js/sandpack-react": "2.54.
|
25
|
+
"@modern-js/sandpack-react": "2.54.5"
|
26
26
|
},
|
27
27
|
"peerDependencies": {
|
28
|
-
"@modern-js/builder-doc": "^2.54.
|
28
|
+
"@modern-js/builder-doc": "^2.54.5"
|
29
29
|
},
|
30
30
|
"devDependencies": {
|
31
31
|
"classnames": "^2",
|
@@ -39,8 +39,8 @@
|
|
39
39
|
"@rspress/shared": "1.18.2",
|
40
40
|
"@types/node": "^16",
|
41
41
|
"@types/fs-extra": "9.0.13",
|
42
|
-
"@modern-js/
|
43
|
-
"@modern-js/doc
|
42
|
+
"@modern-js/doc-plugin-auto-sidebar": "2.54.5",
|
43
|
+
"@modern-js/builder-doc": "2.54.5"
|
44
44
|
},
|
45
45
|
"scripts": {
|
46
46
|
"dev": "rspress dev",
|