@tomjs/vite-plugin-vscode 3.2.0 → 3.2.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/README.md +5 -3
- package/README.zh_CN.md +4 -2
- package/dist/index.d.mts +5 -4
- package/dist/index.d.ts +5 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -236,10 +236,12 @@ The `recommended` option is used to set the default configuration and behavior,
|
|
|
236
236
|
Inject [@tomjs/vscode-extension-webview](https://github.com/tomjs/vscode-extension-webview) into vscode extension code and web client code, so that `webview` can support `HMR` during the development stage.
|
|
237
237
|
|
|
238
238
|
- vite serve
|
|
239
|
-
- extension: Inject `import __getWebviewHtml__ from '@tomjs/
|
|
240
|
-
- web: Add `<script>` tag to index.html and inject `@tomjs/
|
|
239
|
+
- extension: Inject `import __getWebviewHtml__ from '@tomjs/vite-plugin-vscode/webview';` at the top of the file that calls the `__getWebviewHtml__` method
|
|
240
|
+
- web: Add `<script>` tag to index.html and inject `@tomjs/vite-plugin-vscode/client` code
|
|
241
241
|
- vite build
|
|
242
|
-
- extension: Inject `import __getWebviewHtml__ from '@tomjs/vite-plugin-vscode-inject';`
|
|
242
|
+
- extension: Inject `import __getWebviewHtml__ from '@tomjs/vite-plugin-vscode-inject';` at the top of the file that calls the `__getWebviewHtml__` method
|
|
243
|
+
|
|
244
|
+
If is string, will set inject method name. Default is `__getWebviewHtml__`.
|
|
243
245
|
|
|
244
246
|
#### devtools
|
|
245
247
|
|
package/README.zh_CN.md
CHANGED
|
@@ -241,10 +241,12 @@ const value = await acquireVsCodeApi().getState();
|
|
|
241
241
|
在 vscode 扩展代码和 web 客户端代码中注入 [@tomjs/vscode-extension-webview](https://github.com/tomjs/vscode-extension-webview),使 `webview` 在开发阶段能够支持 `HMR`。
|
|
242
242
|
|
|
243
243
|
- vite serve
|
|
244
|
-
- extension: 在调用 `__getWebviewHtml__`
|
|
244
|
+
- extension: 在调用 `__getWebviewHtml__` 方法的文件顶部注入 `import __getWebviewHtml__ from '@tomjs/vscode-extension-webview';`
|
|
245
245
|
- web: 在 index.html 中添加 `<script>` 标签,注入 `@tomjs/vscode-extension-webview/client` 代码
|
|
246
246
|
- vite build
|
|
247
|
-
- extension: 在调用 `__getWebviewHtml__`
|
|
247
|
+
- extension: 在调用 `__getWebviewHtml__` 方法的文件顶部注入 `import __getWebviewHtml__ from '@tomjs/vite-plugin-vscode-inject';`
|
|
248
|
+
|
|
249
|
+
如果为字符串,则设置注入方法名,默认为 `__getWebviewHtml__`。
|
|
248
250
|
|
|
249
251
|
#### devtools
|
|
250
252
|
|
package/dist/index.d.mts
CHANGED
|
@@ -54,16 +54,17 @@ interface PluginOptions {
|
|
|
54
54
|
*/
|
|
55
55
|
recommended?: boolean;
|
|
56
56
|
/**
|
|
57
|
-
* Inject
|
|
57
|
+
* Inject code into vscode extension code and web client code, so that webview can support HMR during the development stage.
|
|
58
58
|
*
|
|
59
59
|
* - vite serve
|
|
60
|
-
*
|
|
61
|
-
*
|
|
60
|
+
* - extension: Inject `import __getWebviewHtml__ from '@tomjs/vite-plugin-vscode/webview';` at the top of the file that calls the `__getWebviewHtml__` method
|
|
61
|
+
* - web: Add `<script>` tag to index.html and inject `@tomjs/vite-plugin-vscode/client` code
|
|
62
62
|
* - vite build
|
|
63
|
-
*
|
|
63
|
+
* - extension: Inject `import __getWebviewHtml__ from '@tomjs/vite-plugin-vscode-inject';` at the top of the file that calls the `__getWebviewHtml__` method
|
|
64
64
|
*
|
|
65
65
|
* If is string, will set inject method name. Default is '__getWebviewHtml__'.
|
|
66
66
|
*
|
|
67
|
+
*
|
|
67
68
|
* @example
|
|
68
69
|
* extension file
|
|
69
70
|
* ```ts
|
package/dist/index.d.ts
CHANGED
|
@@ -54,16 +54,17 @@ interface PluginOptions {
|
|
|
54
54
|
*/
|
|
55
55
|
recommended?: boolean;
|
|
56
56
|
/**
|
|
57
|
-
* Inject
|
|
57
|
+
* Inject code into vscode extension code and web client code, so that webview can support HMR during the development stage.
|
|
58
58
|
*
|
|
59
59
|
* - vite serve
|
|
60
|
-
*
|
|
61
|
-
*
|
|
60
|
+
* - extension: Inject `import __getWebviewHtml__ from '@tomjs/vite-plugin-vscode/webview';` at the top of the file that calls the `__getWebviewHtml__` method
|
|
61
|
+
* - web: Add `<script>` tag to index.html and inject `@tomjs/vite-plugin-vscode/client` code
|
|
62
62
|
* - vite build
|
|
63
|
-
*
|
|
63
|
+
* - extension: Inject `import __getWebviewHtml__ from '@tomjs/vite-plugin-vscode-inject';` at the top of the file that calls the `__getWebviewHtml__` method
|
|
64
64
|
*
|
|
65
65
|
* If is string, will set inject method name. Default is '__getWebviewHtml__'.
|
|
66
66
|
*
|
|
67
|
+
*
|
|
67
68
|
* @example
|
|
68
69
|
* extension file
|
|
69
70
|
* ```ts
|