unplugin-dingtalk 0.2.0 → 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,11 +2,11 @@
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
10
  - [x] 可选注入 [chii](https://github.com/liriliri/chii) 用于调试
11
11
  - [x] 可选打开 [vue-devtools](https://github.com/vuejs/devtools) 用于调试
12
12
  - [x] 支持调试 `HttpOnly` cookies
@@ -25,7 +25,11 @@ interface Options {
25
25
  targetUrl?: string
26
26
  corpId?: string
27
27
  debug?: boolean
28
- /** @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
+ */
29
33
  vconsole?: viteVConsoleOptions
30
34
  /** 需要调试的 cookies, 避免无法调试 HttpOnly 的 cookie */
31
35
  debugCookies?: string[]
@@ -56,3 +60,29 @@ export default defineConfig({
56
60
  ```
57
61
 
58
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>