@tomjs/vite-plugin-vscode 3.1.0 → 3.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.js +4 -2
- package/dist/index.mjs +4 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -256,6 +256,7 @@ function useVSCodePlugin(options) {
|
|
|
256
256
|
}
|
|
257
257
|
let resolvedConfig;
|
|
258
258
|
const prodHtmlCache = {};
|
|
259
|
+
let devtoolsFlag = false;
|
|
259
260
|
return [
|
|
260
261
|
{
|
|
261
262
|
name: "@tomjs:vscode",
|
|
@@ -335,8 +336,9 @@ function useVSCodePlugin(options) {
|
|
|
335
336
|
/<head>/i,
|
|
336
337
|
`<head><script src="http://localhost:${port}"></script>`
|
|
337
338
|
);
|
|
338
|
-
} else {
|
|
339
|
-
|
|
339
|
+
} else if (!devtoolsFlag) {
|
|
340
|
+
devtoolsFlag = true;
|
|
341
|
+
logger.warn("Only support react-devtools and vue-devtools!");
|
|
340
342
|
}
|
|
341
343
|
}
|
|
342
344
|
return html.replace(/<\/title>/i, `</title><script>${devWebviewClient}</script>`);
|
package/dist/index.mjs
CHANGED
|
@@ -263,6 +263,7 @@ function useVSCodePlugin(options) {
|
|
|
263
263
|
}
|
|
264
264
|
let resolvedConfig;
|
|
265
265
|
const prodHtmlCache = {};
|
|
266
|
+
let devtoolsFlag = false;
|
|
266
267
|
return [
|
|
267
268
|
{
|
|
268
269
|
name: "@tomjs:vscode",
|
|
@@ -342,8 +343,9 @@ function useVSCodePlugin(options) {
|
|
|
342
343
|
/<head>/i,
|
|
343
344
|
`<head><script src="http://localhost:${port}"></script>`
|
|
344
345
|
);
|
|
345
|
-
} else {
|
|
346
|
-
|
|
346
|
+
} else if (!devtoolsFlag) {
|
|
347
|
+
devtoolsFlag = true;
|
|
348
|
+
logger.warn("Only support react-devtools and vue-devtools!");
|
|
347
349
|
}
|
|
348
350
|
}
|
|
349
351
|
return html.replace(/<\/title>/i, `</title><script>${devWebviewClient}</script>`);
|