增加 vue devtools 启动编辑器环境变量

This commit is contained in:
Hooray
2025-02-27 16:26:28 +08:00
parent bb7ba8cfc9
commit 06b62d5e8f
2 changed files with 5 additions and 2 deletions
+1
View File
@@ -28,4 +28,5 @@ interface ImportMetaEnv {
* 是否开启开发者工具
*/
readonly VITE_OPEN_DEVTOOLS: boolean
readonly VITE_VUE_DEVTOOLS_LAUNCH_EDITOR: string
}
+4 -2
View File
@@ -36,8 +36,10 @@ export default function createVitePlugins(mode: string, isBuild = false) {
],
}),
// https://github.com/vuejs/devtools-next
viteEnv.VITE_OPEN_DEVTOOLS && VueDevTools(),
// https://github.com/vuejs/devtools
viteEnv.VITE_OPEN_DEVTOOLS && VueDevTools({
launchEditor: viteEnv.VITE_VUE_DEVTOOLS_LAUNCH_EDITOR ?? 'vscode',
}),
envParse({
dtsPath: 'src/types/env.d.ts',