@xunlei-open/miniapp-module-react 0.1.1-beta.0
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/LICENSE +21 -0
- package/README.md +13 -0
- package/dist/index.d.mts +10 -0
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +10 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +43 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 miniapp-devkit contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# @xunlei-open/miniapp-module-react
|
|
2
|
+
|
|
3
|
+
在项目中安装此模块,并配置:
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import { defineConfig } from '@xunlei-open/miniapp'
|
|
7
|
+
|
|
8
|
+
export default defineConfig({
|
|
9
|
+
modules: ['@xunlei-open/miniapp-module-react'],
|
|
10
|
+
})
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
模块自动注册 react 的 Vite 插件。不执行类型检查;build 和 package 使用统一 CLI 命令。
|
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/index.ts"],"mappings":""}
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import react from "@vitejs/plugin-react";
|
|
2
|
+
//#region src/index.ts
|
|
3
|
+
var src_default = {
|
|
4
|
+
name: "@xunlei-open/miniapp-module-react",
|
|
5
|
+
vite: () => ({ plugins: [react()] })
|
|
6
|
+
};
|
|
7
|
+
//#endregion
|
|
8
|
+
export { src_default as default };
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../src/index.ts"],"sourcesContent":["import react from '@vitejs/plugin-react'\nimport type { MiniappModule } from '@xunlei-open/miniapp'\n\nexport default {\n name: '@xunlei-open/miniapp-module-react',\n vite: () => ({ plugins: [react()] }),\n} satisfies MiniappModule\n"],"mappings":";;AAGA,IAAA,cAAe;CACb,MAAM;CACN,aAAa,EAAE,SAAS,CAAC,MAAM,CAAC,EAAE;AACpC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@xunlei-open/miniapp-module-react",
|
|
3
|
+
"version": "0.1.1-beta.0",
|
|
4
|
+
"description": "React framework module for Xunlei Miniapps",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": {
|
|
8
|
+
"types": "./dist/index.d.mts",
|
|
9
|
+
"default": "./dist/index.mjs"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"dist",
|
|
14
|
+
"README.md"
|
|
15
|
+
],
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"repository": {
|
|
18
|
+
"type": "git",
|
|
19
|
+
"url": "git+https://github.com/xunlei-open/miniapp-devkit.git",
|
|
20
|
+
"directory": "packages/miniapp-module-react"
|
|
21
|
+
},
|
|
22
|
+
"publishConfig": {
|
|
23
|
+
"access": "public"
|
|
24
|
+
},
|
|
25
|
+
"engines": {
|
|
26
|
+
"node": ">=20.19.0"
|
|
27
|
+
},
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"@xunlei-open/miniapp": "^0.1.1-beta.0",
|
|
30
|
+
"vite": "^8.0.0"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@vitejs/plugin-react": "^5.2.0"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"vite": "^8.2.0",
|
|
37
|
+
"@xunlei-open/miniapp": "^0.1.1-beta.0"
|
|
38
|
+
},
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "tsdown",
|
|
41
|
+
"check": "tsc --noEmit"
|
|
42
|
+
}
|
|
43
|
+
}
|