chore: remove unused h-setup-ai-tools command and update vue-devtools plugin logic
This commit is contained in:
@@ -10,5 +10,4 @@ h-setup-locale
|
|||||||
h-setup-zsh
|
h-setup-zsh
|
||||||
|
|
||||||
h-setup-bun-bin
|
h-setup-bun-bin
|
||||||
h-setup-ai-tools
|
|
||||||
h-setup-pnpm-bin
|
h-setup-pnpm-bin
|
||||||
|
|||||||
2
typed-router.d.ts
vendored
2
typed-router.d.ts
vendored
@@ -2,7 +2,7 @@
|
|||||||
/* prettier-ignore */
|
/* prettier-ignore */
|
||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
// noinspection ES6UnusedImports
|
// noinspection ES6UnusedImports
|
||||||
// Generated by unplugin-vue-router. ‼️ DO NOT MODIFY THIS FILE ‼️
|
// Generated by unplugin-vue-router. !! DO NOT MODIFY THIS FILE !!
|
||||||
// It's recommended to commit this file.
|
// It's recommended to commit this file.
|
||||||
// Make sure to add this file to your tsconfig.json file as an "includes" or "files" entry.
|
// Make sure to add this file to your tsconfig.json file as an "includes" or "files" entry.
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,23 @@
|
|||||||
import consola from 'consola';
|
import consola from 'consola';
|
||||||
import type { ConfigEnv, PluginOption } from 'vite';
|
import type { ConfigEnv, PluginOption } from 'vite';
|
||||||
import { loadEnv } from 'vite';
|
|
||||||
import vueDevTools from 'vite-plugin-vue-devtools';
|
import vueDevTools from 'vite-plugin-vue-devtools';
|
||||||
|
|
||||||
export function loadPlugin(configEnv: ConfigEnv): PluginOption {
|
export function loadPlugin(configEnv: ConfigEnv): PluginOption {
|
||||||
const env = loadEnv(configEnv.mode, process.cwd());
|
if (configEnv.mode !== 'development') {
|
||||||
|
consola.info('vue-devtools 插件仅在开发模式下使用。');
|
||||||
if (configEnv.command === 'build') {
|
|
||||||
consola.info('vue-devtools plugin is not used in build mode.');
|
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (env.VITE_APP_ENABLE_VUE_DEVTOOLS !== 'true') {
|
let launchEditor = 'code';
|
||||||
consola.info('vue-devtools plugin disabled by env');
|
|
||||||
return [];
|
if (process.env.TERM_PROGRAM_VERSION?.toLowerCase()?.includes('insider')) {
|
||||||
|
consola.info('检测到 VSCode Insiders 环境。');
|
||||||
|
launchEditor = 'code-insiders';
|
||||||
}
|
}
|
||||||
|
|
||||||
return [vueDevTools()];
|
return [
|
||||||
|
vueDevTools({
|
||||||
|
launchEditor: launchEditor,
|
||||||
|
}),
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user