@modern-js/main-doc 2.30.0 → 2.31.1

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @modern-js/main-doc
2
2
 
3
+ ## 2.31.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 7c4698f: fix(main-doc): modify the correct NoSSR import mode
8
+
9
+ fix(main-doc): 修复 NoSSR 组件引入找不到
10
+
11
+ - @modern-js/builder-doc@2.31.1
12
+
13
+ ## 2.31.0
14
+
15
+ ### Patch Changes
16
+
17
+ - @modern-js/builder-doc@2.31.0
18
+
3
19
  ## 2.30.0
4
20
 
5
21
  ### Patch Changes
@@ -8,7 +8,7 @@ The content wrapped by NoSSR will not be rendered at the server, nor will it be
8
8
  ## Usage
9
9
 
10
10
  ```tsx
11
- import { NoSSR } from '@modern-js/runtime';
11
+ import { NoSSR } from '@modern-js/runtime/ssr';
12
12
 
13
13
  export default () => <NoSSR>...</NoSSR>;
14
14
  ```
@@ -18,7 +18,7 @@ export default () => <NoSSR>...</NoSSR>;
18
18
  In the following code, the `Time` component is used to display the current time. Since the time obtained by server-side rendering and client side hydrate are diff, React will throw an exception. For this case, you can use `NoSSR` to optimize:
19
19
 
20
20
  ```tsx
21
- import { NoSSR } from '@modern-js/runtime';
21
+ import { NoSSR } from '@modern-js/runtime/ssr';
22
22
 
23
23
  function Time() {
24
24
  return (
@@ -0,0 +1,10 @@
1
+ ---
2
+ sidebar_label: enableInlineRouteManifests
3
+ ---
4
+
5
+ # output.enableInlineRouteManifests
6
+
7
+ - **Type:** `boolean`
8
+ - **Default:** `true`
9
+
10
+ When using convention-based routing, the framework injects routing information into the client for optimization purposes. By default, routing information is injected into the html, but when this is configured to `false`, routing information is injected into a separate JS file.
@@ -17,7 +17,8 @@ Refer to [How to Develop Plugins](/guides/topic-detail/framework-plugin/implemen
17
17
  This option is used to configure framework plugins. If you need to configure other types of plugins, please choose the corresponding configuration method:
18
18
 
19
19
  - To configure Modern.js Builder plugins, use the [builderPlugins](/configure/app/builder-plugins) option.
20
- - To configure webpack plugins, use the [tools.webpack](/configure/app/tools/webpack) or [tools.webpackChain](/configure/app/tools/webpack-chain) options.
20
+ - To configure webpack plugins, use the [tools.webpack](/configure/app/tools/webpack)、[tools.webpackChain](/configure/app/tools/webpack-chain) or [tools.bundlerChain](/configure/app/tools/bundler-chain) options.
21
+ - To configure Rspack plugins, use the [tools.rspack](/configure/app/tools/rspack) or [tools.bundlerChain](/configure/app/tools/bundler-chain) options.
21
22
  - To configure Babel plugins, use the [tools.babel](/configure/app/tools/babel) option.
22
23
 
23
24
  ## Plugin types
@@ -8,7 +8,7 @@ title: NoSSR
8
8
  ## 使用姿势
9
9
 
10
10
  ```tsx
11
- import { NoSSR } from '@modern-js/runtime';
11
+ import { NoSSR } from '@modern-js/runtime/ssr';
12
12
 
13
13
  export default () => <NoSSR>...</NoSSR>;
14
14
  ```
@@ -18,7 +18,7 @@ export default () => <NoSSR>...</NoSSR>;
18
18
  下列代码中,`Time` 组件用于展示当前的时间,由于服务端渲染和客户端 hydrate 时获取到的时间是不一致的,React 就会抛出异常。针对这种情况可以使用 `NoSSR` 进行优化:
19
19
 
20
20
  ```tsx
21
- import { NoSSR } from '@modern-js/runtime';
21
+ import { NoSSR } from '@modern-js/runtime/ssr';
22
22
 
23
23
  function Time() {
24
24
  return (
@@ -0,0 +1,21 @@
1
+ ---
2
+ sidebar_label: enableInlineRouteManifests
3
+ ---
4
+
5
+ # output.enableInlineRouteManifests
6
+
7
+ - **类型:** `boolean`
8
+ - **默认值:** `true`
9
+
10
+ 当使用约定式路由时,框架为了做一些优化,会向客户端中注入路由信息,默认情况下路由信息会注入到 html 中,
11
+ 当该配置为 `false` 时,路由信息会注入到一个单独的 JS 文件中。
12
+
13
+ Example:
14
+
15
+ ```ts
16
+ export default {
17
+ output: {
18
+ enableInlineRouteManifests: false,
19
+ },
20
+ }
21
+ ```
@@ -17,7 +17,8 @@ sidebar_position: 9
17
17
  该选项**用于配置框架插件**,如果你需要配置其他类型的插件,请选择对应的配置方式:
18
18
 
19
19
  - 配置 Modern.js Builder 插件,请使用 [builderPlugins](/configure/app/builder-plugins) 配置项。
20
- - 配置 webpack 插件,请使用 [tools.webpack](/configure/app/tools/webpack) 或 [tools.webpackChain](/configure/app/tools/webpack-chain) 配置项。
20
+ - 配置 webpack 插件,请使用 [tools.webpack](/configure/app/tools/webpack)、[tools.webpackChain](/configure/app/tools/webpack-chain) 或 [tools.bundlerChain](/configure/app/tools/bundler-chain) 配置项。
21
+ - 配置 Rspack 插件,请使用 [tools.rspack](/configure/app/tools/rspack) 或 [tools.bundlerChain](/configure/app/tools/bundler-chain) 配置项。
21
22
  - 配置 Babel 插件,请使用 [tools.babel](/configure/app/tools/babel) 配置项。
22
23
 
23
24
  ## 插件类型
package/package.json CHANGED
@@ -15,14 +15,14 @@
15
15
  "modern",
16
16
  "modern.js"
17
17
  ],
18
- "version": "2.30.0",
18
+ "version": "2.31.1",
19
19
  "publishConfig": {
20
20
  "registry": "https://registry.npmjs.org/",
21
21
  "access": "public",
22
22
  "provenance": true
23
23
  },
24
24
  "peerDependencies": {
25
- "@modern-js/builder-doc": "^2.30.0"
25
+ "@modern-js/builder-doc": "^2.31.1"
26
26
  },
27
27
  "devDependencies": {
28
28
  "classnames": "^2",
@@ -34,9 +34,9 @@
34
34
  "fs-extra": "^10",
35
35
  "@types/node": "^16",
36
36
  "@types/fs-extra": "^9",
37
- "@modern-js/builder-doc": "2.30.0",
38
- "@modern-js/doc-tools": "2.30.0",
39
- "@modern-js/doc-plugin-auto-sidebar": "2.30.0"
37
+ "@modern-js/builder-doc": "2.31.1",
38
+ "@modern-js/doc-tools": "2.31.1",
39
+ "@modern-js/doc-plugin-auto-sidebar": "2.31.1"
40
40
  },
41
41
  "scripts": {
42
42
  "dev": "modern dev",
@@ -13,6 +13,34 @@ export const useShowcases = (): ShowcaseItem[] => {
13
13
  const t = useI18n();
14
14
 
15
15
  return [
16
+ {
17
+ name: 'Tiktok Seller',
18
+ url: 'https://seller-us-accounts.tiktok.com/',
19
+ preview:
20
+ 'https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/showcase/tiktok-seller-showcase-08172.png',
21
+ type: 'framework',
22
+ },
23
+ {
24
+ name: 'Tiktok Streamer',
25
+ url: 'https://shop.tiktok.com/streamer/welcome',
26
+ preview:
27
+ 'https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/showcase/tiktok-steamer-showcase-08172.png',
28
+ type: 'framework',
29
+ },
30
+ {
31
+ name: 'Tiktok Shop Partner',
32
+ url: 'https://partner-us.tiktok.com/',
33
+ preview:
34
+ 'https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/showcase/tiktok-shop-partner-0817.png',
35
+ type: 'framework',
36
+ },
37
+ {
38
+ name: t('doubao'),
39
+ url: 'https://www.doubao.com/',
40
+ preview:
41
+ 'https://lf3-static.bytednsdoc.com/obj/eden-cn/zq-uylkvT/ljhwZthlaukjlkulzlp/showcase/doubao-showcase-0817.png',
42
+ type: 'framework',
43
+ },
16
44
  {
17
45
  name: t('volctrans'),
18
46
  url: 'https://translate.volcengine.com/',
package/src/i18n/enUS.ts CHANGED
@@ -49,6 +49,7 @@ export const EN_US = {
49
49
  changelog: 'Changelog',
50
50
 
51
51
  // Showcases
52
+ doubao: 'Doubao',
52
53
  writingo: 'Writingo',
53
54
  volctrans: 'Volctrans',
54
55
  shidianbaike: 'Shidian Baike',
package/src/i18n/zhCN.ts CHANGED
@@ -49,6 +49,7 @@ export const ZH_CN: Record<keyof typeof EN_US, string> = {
49
49
  changelog: '更新日志',
50
50
 
51
51
  // Showcase
52
+ doubao: '豆包',
52
53
  writingo: '火山写作',
53
54
  volctrans: '火山翻译',
54
55
  shidianbaike: '识典百科',