@modern-js/module-tools-docs 2.46.0 → 2.46.1

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,5 +1,7 @@
1
1
  # @modern-js/module-tools-docs
2
2
 
3
+ ## 2.46.1
4
+
3
5
  ## 2.46.0
4
6
 
5
7
  ## 2.45.0
@@ -134,14 +134,17 @@ export default () => <Logo />;
134
134
 
135
135
  :::
136
136
 
137
- When enabled, the type of svg used can be modified by adding a type definition to the `modern-app-env.d.ts` file:
137
+ When enabled, the type of svg used can be modified by initing a new declaration file and adding to the `modern-app-env.d.ts`:
138
138
 
139
- ```ts title="modern-app-env.d.ts"
139
+ ```ts title="your-app-env.d.ts"
140
140
  declare module '*.svg' {
141
141
  const src: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
142
142
  export default src;
143
143
  }
144
+ ```
144
145
 
146
+ ```ts title="modern-app-env.d.ts"
147
+ /// <reference path='./your-app-env.d.ts' />
145
148
  /// <reference types='@modern-js/module-tools/types' />
146
149
  ```
147
150
 
@@ -0,0 +1,13 @@
1
+ # General Questions
2
+
3
+ ## What is the relationship between Modern.js Module and Rsbuild?
4
+
5
+ Modern.js Module uses esbuild to build toolkits and component libraries, and Rsbuild focuses on solving web application building scenarios.
6
+
7
+ ## Can Modern.js Module use webpack plugins or loaders?
8
+
9
+ Modern.js Module is based on esbuild for building and cannot use tools from the webpack-related ecosystem.
10
+ You can find more community plugins for esbuild [here](https://github.com/esbuild/community-plugins)
11
+
12
+ If the UMD product produced by Modern.js Module does not meet your requirements, you can use Rsbuild and add [UMD Plugin](https://rsbuild.dev/plugins/list/plugin-umd) to build UMD products.
13
+
@@ -2,6 +2,7 @@
2
2
 
3
3
  Here is a list of all frequently asked questions about Modern.js Module.
4
4
 
5
+ - [General FAQ](./basic.mdx)
5
6
  - [Build FAQ](./build.mdx)
6
7
  - [Storybook FAQ](./storybook.mdx)
7
8
  - [Test FAQ](./test.mdx)
@@ -132,14 +132,17 @@ import Logo from './logo.svg';
132
132
  export default () => <Logo />;
133
133
  ```
134
134
 
135
- 当开启功能后,可以通过在 `modern-app-env.d.ts` 文件中增加类型定义,修改使用 SVG 的类型:
135
+ 当开启功能后,可以新建一个类型描述文件,并在 `modern-app-env.d.ts` 文件中增加,修改使用 SVG 的类型:
136
136
 
137
- ```ts title="modern-app-env.d.ts"
137
+ ```ts title="your-app-env.d.ts"
138
138
  declare module '*.svg' {
139
139
  const src: React.FunctionComponent<React.SVGProps<SVGSVGElement>>;
140
140
  export default src;
141
141
  }
142
+ ```
142
143
 
144
+ ```ts title="modern-app-env.d.ts"
145
+ /// <reference path='./your-app-env.d.ts' />
143
146
  /// <reference types='@modern-js/module-tools/types' />
144
147
  ```
145
148
 
@@ -0,0 +1,12 @@
1
+ # 通用类问题
2
+
3
+ ## Modern.js Module 和 Rsbuild 的关系?
4
+
5
+ Modern.js Module 使用 esbuild 构建工具库和组件库,Rsbuild 专注于解决 Web 应用构建场景。
6
+
7
+ ## Modern.js Module 是否可以使用 webpack plugin 或者 loader?
8
+
9
+ Modern.js Module 基于 esbuild 构建,无法使用 webpack 相关生态的工具。
10
+ [这里](https://github.com/esbuild/community-plugins)可以发现更多 esbuild 社区插件
11
+
12
+ 如果 Modern.js Module 生产的 UMD 产物达不到你的要求,可以使用 Rsbuild 并添加 [UMD Plugin](https://rsbuild.dev/zh/plugins/list/plugin-umd) 构建 UMD 产物。
@@ -2,6 +2,7 @@
2
2
 
3
3
  这里是 Modern.js Module 常见问题分类列表:
4
4
 
5
+ - [通用类问题](./basic.mdx)
5
6
  - [构建相关问题](./build.mdx)
6
7
  - [Storybook 相关问题](./storybook.mdx)
7
8
  - [测试相关问题](./test.mdx)
package/package.json CHANGED
@@ -9,14 +9,14 @@
9
9
  "directory": "packages/document/module-doc"
10
10
  },
11
11
  "license": "MIT",
12
- "version": "2.46.0",
12
+ "version": "2.46.1",
13
13
  "main": "index.js",
14
14
  "devDependencies": {
15
15
  "react": "^18.2.0",
16
16
  "react-dom": "^18.2.0",
17
- "rspress": "1.9.3",
18
- "@rspress/shared": "1.9.3",
19
- "@modern-js/doc-plugin-auto-sidebar": "2.46.0"
17
+ "rspress": "1.10.0",
18
+ "@rspress/shared": "1.10.0",
19
+ "@modern-js/doc-plugin-auto-sidebar": "2.46.1"
20
20
  },
21
21
  "scripts": {
22
22
  "dev": "rspress dev",