@xunlei-open/vite-plugin-miniapp 0.1.1-beta.0 → 0.1.1-beta.2
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/README.md +4 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# @xunlei-open/vite-plugin-miniapp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
迅雷微应用的底层 Vite 构建插件,处理应用清单、图标和事件脚本。一般项目使用 [@xunlei-open/miniapp](https://github.com/xunlei-open/miniapp-devkit/tree/main/packages/miniapp) 即可。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
需要直接接入 Vite 时:
|
|
6
6
|
|
|
7
7
|
```bash
|
|
8
8
|
pnpm add -D @xunlei-open/vite-plugin-miniapp vite
|
|
@@ -17,12 +17,6 @@ export default defineConfig({
|
|
|
17
17
|
})
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
|
|
20
|
+
默认读取 `manifest.json`,将清单和图标复制到构建目录,并将 `src/events` 中的事件脚本构建到 `events/`。没有事件脚本时无需创建该目录。
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
miniapp({
|
|
24
|
-
eventsDir: 'src/events',
|
|
25
|
-
eventsExtensions: ['.ts', '.js'],
|
|
26
|
-
manifestFile: 'manifest.json',
|
|
27
|
-
})
|
|
28
|
-
```
|
|
22
|
+
[官方开发文档](https://open.xunlei.com/doc/miniapp/introduction)
|