Skip to content

Commit

Permalink
首次发布
Browse files Browse the repository at this point in the history
  • Loading branch information
censujiang committed Dec 18, 2022
1 parent f178c2d commit 6e080e6
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 0 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
# vite-plugin-uniwebviewjs-ssr
uni-webview-js在vite的SSR(或SSG)下的使用解决方案

插件仍处于测试版,如需使用,可以这样引入:

```js
import { uni } from 'vite-plugin-uniwebviewjs-ssr'
```
7 changes: 7 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
let modules
try {
const u = await import('@dcloudio/uni-webview-js');
modules = u.default
} catch (e) {
}
export const uni = modules
24 changes: 24 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"name": "vite-plugin-uniwebviewjs-ssr",
"version": "0.0.1",
"type": "module",
"description": "uni-webview-js在vite的SSR(或SSG)下的使用解决方案",
"main": "index.js",
"repository": "https://github.com/censujiang/vite-plugin-uniwebviewjs-ssr",
"author": "江程训 <dfjsiou@qq.com>",
"keywords": [
"vite",
"uni-app",
"uniapp",
"uni-webview-js",
"ssr",
"ssg"
],
"license": "Apache License 2.0",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"dependencies": {
"@dcloudio/uni-webview-js": "^0.0.3"
}
}
8 changes: 8 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1


"@dcloudio/uni-webview-js@^0.0.3":
version "0.0.3"
resolved "https://mirrors.huaweicloud.com/repository/npm/@dcloudio/uni-webview-js/-/uni-webview-js-0.0.3.tgz#569681eaa56ceadc2f08184b7eafbc320155381a"
integrity sha512-3XDnLXg22QKC/aTLtGim6zbOK+euiDYoRf98BjGDE0lqMm1U4SLFHAvOlAHa0qck91phaceKwo73ScQQgSojQg==

0 comments on commit 6e080e6

Please sign in to comment.