vite-plugin-deploy-oss 1.0.0 → 1.0.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/0.jpg +0 -0
- package/index.html +11 -0
- package/package.json +3 -2
- package/vite.config.ts +28 -0
package/0.jpg
ADDED
|
Binary file
|
package/index.html
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="zh-CN">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<title>Document</title>
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<img style="width: 12px" src="./0.jpg" alt="" draggable="false" />
|
|
10
|
+
</body>
|
|
11
|
+
</html>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-deploy-oss",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
},
|
|
43
43
|
"scripts": {
|
|
44
44
|
"build": "tsup",
|
|
45
|
-
"pack": "pnpm run build && pnpm pack"
|
|
45
|
+
"pack": "pnpm run build && pnpm pack",
|
|
46
|
+
"build:test": "vite build"
|
|
46
47
|
}
|
|
47
48
|
}
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { defineConfig } from 'vite'
|
|
2
|
+
import vitePluginDeployOss from './src'
|
|
3
|
+
|
|
4
|
+
export default defineConfig({
|
|
5
|
+
plugins: [
|
|
6
|
+
vitePluginDeployOss({
|
|
7
|
+
open: true,
|
|
8
|
+
|
|
9
|
+
accessKeyId: process.env.zAccessKeyId || '',
|
|
10
|
+
accessKeySecret: process.env.zAccessKeySecret || '',
|
|
11
|
+
bucket: process.env.zBucket || '',
|
|
12
|
+
region: 'oss-cn-beijing',
|
|
13
|
+
alias: process.env.zBucketAlias || '',
|
|
14
|
+
uploadDir: `/test/__test/`,
|
|
15
|
+
skip: ['**/*.html', '**/pluginWebUpdateNotice/**'],
|
|
16
|
+
overwrite: true,
|
|
17
|
+
autoDelete: true,
|
|
18
|
+
|
|
19
|
+
// 修改打包后的资源路径
|
|
20
|
+
configBase: `${process.env.zBucketAlias || ''}/test/__test/`,
|
|
21
|
+
}),
|
|
22
|
+
],
|
|
23
|
+
|
|
24
|
+
build: {
|
|
25
|
+
outDir: 'assets',
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
})
|