@modern-js/main-doc 0.0.0-next-1683391129938 → 0.0.0-next-1683468411857
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/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# @modern-js/main-doc
|
|
2
2
|
|
|
3
|
-
## 0.0.0-next-
|
|
3
|
+
## 0.0.0-next-1683468411857
|
|
4
4
|
|
|
5
5
|
### Patch Changes
|
|
6
6
|
|
|
7
7
|
- d0a9bf864: chore: improve entry docs, fix ssg docs
|
|
8
8
|
chore: 优化入口文档,修复 ssg 文档
|
|
9
|
-
- @modern-js/builder-doc@0.0.0-next-
|
|
9
|
+
- @modern-js/builder-doc@0.0.0-next-1683468411857
|
|
10
10
|
|
|
11
11
|
## 2.17.1
|
|
12
12
|
|
|
@@ -415,3 +415,17 @@ export default defineConfig({
|
|
|
415
415
|
},
|
|
416
416
|
});
|
|
417
417
|
```
|
|
418
|
+
|
|
419
|
+
## FAQs
|
|
420
|
+
|
|
421
|
+
1. The code in the product is es2015+ but expect to be in es5.
|
|
422
|
+
|
|
423
|
+
The default product of react-router^6 is in es2020. If you need the code in the product to be in es5, you can configure `source.include` to get the relevant packages of react-router compiled by the bundler.
|
|
424
|
+
|
|
425
|
+
```js
|
|
426
|
+
export default defineConfig({
|
|
427
|
+
source: {
|
|
428
|
+
include: [/@remix-run\/router/, /react-router-dom/, /react-router/],
|
|
429
|
+
}
|
|
430
|
+
});
|
|
431
|
+
```
|
|
@@ -514,18 +514,18 @@ export default defineConfig({
|
|
|
514
514
|
});
|
|
515
515
|
```
|
|
516
516
|
|
|
517
|
-
|
|
517
|
+
## 常见问题
|
|
518
518
|
|
|
519
519
|
1. 产物中的代码是 es2015+ 的,期望产物中是 es5 的代码
|
|
520
520
|
|
|
521
521
|
react-router^6 的目前默认产物是 es2020 的,如果需要产物中是 es5 的代码,可以配置 `source.include`,让 react-router 相关包经过 bundler 编译 :
|
|
522
522
|
|
|
523
|
-
```
|
|
524
|
-
|
|
523
|
+
```js
|
|
524
|
+
export default defineConfig({
|
|
525
525
|
source: {
|
|
526
526
|
include: [/@remix-run\/router/, /react-router-dom/, /react-router/],
|
|
527
527
|
}
|
|
528
|
-
}
|
|
528
|
+
});
|
|
529
529
|
```
|
|
530
530
|
|
|
531
531
|
|
package/package.json
CHANGED
|
@@ -15,13 +15,13 @@
|
|
|
15
15
|
"modern",
|
|
16
16
|
"modern.js"
|
|
17
17
|
],
|
|
18
|
-
"version": "0.0.0-next-
|
|
18
|
+
"version": "0.0.0-next-1683468411857",
|
|
19
19
|
"publishConfig": {
|
|
20
20
|
"registry": "https://registry.npmjs.org/",
|
|
21
21
|
"access": "public"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
24
|
-
"@modern-js/builder-doc": "0.0.0-next-
|
|
24
|
+
"@modern-js/builder-doc": "0.0.0-next-1683468411857"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"classnames": "^2",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"fs-extra": "^10",
|
|
34
34
|
"@types/node": "^16",
|
|
35
35
|
"@types/fs-extra": "^9",
|
|
36
|
-
"@modern-js/builder-doc": "0.0.0-next-
|
|
37
|
-
"@modern-js/doc-plugin-auto-sidebar": "0.0.0-next-
|
|
38
|
-
"@modern-js/doc-tools": "0.0.0-next-
|
|
36
|
+
"@modern-js/builder-doc": "0.0.0-next-1683468411857",
|
|
37
|
+
"@modern-js/doc-plugin-auto-sidebar": "0.0.0-next-1683468411857",
|
|
38
|
+
"@modern-js/doc-tools": "0.0.0-next-1683468411857"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"dev": "modern dev",
|