unplugin-dingtalk 0.1.9 → 0.3.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/README.md CHANGED
@@ -2,12 +2,14 @@
2
2
 
3
3
  [![NPM version](https://img.shields.io/npm/v/unplugin-dingtalk?color=a1b858&label=)](https://www.npmjs.com/package/unplugin-dingtalk)
4
4
 
5
- 一键启动钉钉内调试。(目前仅支持 vite )
5
+ 一键启动钉钉内调试。
6
6
 
7
7
  ## 功能
8
8
  - [x] 在钉钉内打开调试链接
9
- - [x] 可选注入 [vConsole](https://github.com/Tencent/vConsole) 用于调试
9
+ - [x] 可选注入 [vConsole](https://github.com/Tencent/vConsole) 用于调试 (仅支持 vite )
10
+ - [x] 可选注入 [chii](https://github.com/liriliri/chii) 用于调试
10
11
  - [x] 可选打开 [vue-devtools](https://github.com/vuejs/devtools) 用于调试
12
+ - [x] 支持调试 `HttpOnly` cookies
11
13
 
12
14
  ![images](https://github.com/zcf0508/unplugin-dingtalk/raw/main/images/Snipaste_2024-05-22_11-25-35.png)
13
15
 
@@ -23,10 +25,16 @@ interface Options {
23
25
  targetUrl?: string
24
26
  corpId?: string
25
27
  debug?: boolean
26
- /** @link https://github.com/vadxq/vite-plugin-vconsole#vitevconsole-options */
28
+ /**
29
+ * only support vite
30
+ *
31
+ * @link https://github.com/vadxq/vite-plugin-vconsole#vitevconsole-options
32
+ */
27
33
  vconsole?: viteVConsoleOptions
28
34
  /** 需要调试的 cookies, 避免无法调试 HttpOnly 的 cookie */
29
35
  debugCookies?: string[]
36
+ /** 默认值 `true` */
37
+ chii?: boolean
30
38
  vueDevtools?: {
31
39
  enable?: boolean
32
40
  host?: string
@@ -52,3 +60,29 @@ export default defineConfig({
52
60
  ```
53
61
 
54
62
  <br></details>
63
+
64
+ <details>
65
+ <summary>Vue CLI 5</summary><br>
66
+
67
+ ```js
68
+ // vue.config.js
69
+ const [setupMiddlewares, unpluginDingtalk] = require('unplugin-dingtalk/webpack').default({
70
+ enable: true,
71
+ });
72
+
73
+ /**
74
+ * @type {import('@vue/cli-service').ProjectOptions}
75
+ */
76
+ module.exports = {
77
+ devServer: {
78
+ setupMiddlewares,
79
+ },
80
+ configureWebpack: {
81
+ plugins: [
82
+ unpluginDingtalk,
83
+ ],
84
+ },
85
+ };
86
+ ```
87
+
88
+ <br></details>