@cnguu/vite-plugin-uni-cdn 1.0.1 → 1.1.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/dist/index.d.cts CHANGED
@@ -30,3 +30,4 @@ interface VitePluginUniCdnOption {
30
30
  declare function UniCdn(opt: VitePluginUniCdnOption): Plugin;
31
31
 
32
32
  export = UniCdn;
33
+ export type { VitePluginUniCdnOption };
package/dist/index.d.mts CHANGED
@@ -30,3 +30,4 @@ interface VitePluginUniCdnOption {
30
30
  declare function UniCdn(opt: VitePluginUniCdnOption): Plugin;
31
31
 
32
32
  export { UniCdn as default };
33
+ export type { VitePluginUniCdnOption };
package/dist/index.d.ts CHANGED
@@ -30,3 +30,4 @@ interface VitePluginUniCdnOption {
30
30
  declare function UniCdn(opt: VitePluginUniCdnOption): Plugin;
31
31
 
32
32
  export = UniCdn;
33
+ export type { VitePluginUniCdnOption };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cnguu/vite-plugin-uni-cdn",
3
3
  "type": "module",
4
- "version": "1.0.1",
4
+ "version": "1.1.1",
5
5
  "description": "Vite 插件,在 UniApp 中替换资源链接为 CDN 链接",
6
6
  "license": "MIT",
7
7
  "homepage": "https://github.com/cnguu/vite-plugin-uni-cdn",
package/dist/README.md DELETED
@@ -1,65 +0,0 @@
1
- # vite-plugin-uni-cdn
2
-
3
- Vite 插件,在 UniApp 中替换静态资源链接为 CDN 链接
4
-
5
- [![release](https://badgen.net/github/release/cnguu/vite-plugin-uni-cdn)](https://github.com/cnguu/vite-plugin-uni-cdn/releases)
6
- [![license](https://badgen.net/github/license/cnguu/vite-plugin-uni-cdn)](https://github.com/cnguu/vite-plugin-uni-cdn/blob/main/LICENSE)
7
-
8
- ## 安装
9
-
10
- ```shell
11
- pnpm i -D @cnguu/vite-plugin-uni-cdn
12
- ```
13
-
14
- ## 使用
15
-
16
- ```typescript
17
- // vite.config.ts
18
- import UniCdn from '@cnguu/vite-plugin-uni-cdn'
19
- import Uni from '@dcloudio/vite-plugin-uni'
20
- import { defineConfig } from 'vite'
21
-
22
- export default defineConfig({
23
- plugins: [
24
- UniCdn({
25
- cdn: 'https://cdn.jsdelivr.net/gh/cnguu/vite-plugin-uni-cdn@main/packages/playground/src/static/cdn',
26
- sourceDir: 'src/static/cdn',
27
- }),
28
- Uni(),
29
- ],
30
- })
31
- ```
32
-
33
- > 目前只支持绝对路径,如 `/static/xxx/xxx.png`
34
-
35
- ## 参数
36
-
37
- ### `cdn`
38
-
39
- - cdn 地址
40
- - 默认 `''`
41
-
42
- ### `sourceDir`
43
-
44
- - 替换资源目录,不在该目录下的资源不会被替换
45
- - 默认 `'static/cdn'`
46
-
47
- ### `include`
48
-
49
- - 扫描白名单 GLOB 格式
50
- - 默认 `['**/*.{vue,css,scss,sass,less,styl}']`
51
-
52
- ### `exclude`
53
-
54
- - 扫描黑名单 GLOB 格式
55
- - 默认 `['**/node_modules/**', '**/uni_modules/**', '**/dist/**', '**/unpackage/**']`
56
-
57
- ### `deleteOutputFiles`
58
-
59
- - 是否删除替换资源目录对应的输出目录
60
- - 默认 `true`
61
-
62
- ### `verbose`
63
-
64
- - 是否输出命令行信息
65
- - 默认 `true`
package/dist/package.json DELETED
@@ -1,55 +0,0 @@
1
- {
2
- "name": "@cnguu/vite-plugin-uni-cdn",
3
- "type": "module",
4
- "version": "1.0.1",
5
- "description": "Vite 插件,在 UniApp 中替换资源链接为 CDN 链接",
6
- "license": "MIT",
7
- "homepage": "https://github.com/cnguu/vite-plugin-uni-cdn",
8
- "repository": {
9
- "type": "git",
10
- "url": "git+https://github.com/cnguu/vite-plugin-uni-cdn.git"
11
- },
12
- "bugs": "https://github.com/cnguu/vite-plugin-uni-cdn/issues",
13
- "keywords": [
14
- "vite",
15
- "plugin",
16
- "uni",
17
- "uniapp",
18
- "cdn"
19
- ],
20
- "maintainers": [
21
- {
22
- "name": "cnguu",
23
- "email": "gu642779596@gmail.com",
24
- "url": "https://github.com/cnguu"
25
- }
26
- ],
27
- "sideEffects": false,
28
- "exports": {
29
- ".": {
30
- "import": {
31
- "types": "./index.d.ts",
32
- "default": "./dist/index.mjs"
33
- },
34
- "require": {
35
- "types": "./index.d.ts",
36
- "default": "./dist/index.cjs"
37
- }
38
- }
39
- },
40
- "main": "./dist/index.cjs",
41
- "module": "./dist/index.mjs",
42
- "types": "./index.d.ts",
43
- "files": [
44
- "dist",
45
- "index.d.ts"
46
- ],
47
- "scripts": {
48
- "build": "unbuild",
49
- "debug": "cross-env NODE_ENV=development unbuild --sourcemap",
50
- "stub": "unbuild --stub"
51
- },
52
- "peerDependencies": {
53
- "vite": "^5.0.0"
54
- }
55
- }