初始化
This commit is contained in:
13
build/plugins/devtools.ts
Normal file
13
build/plugins/devtools.ts
Normal file
@@ -0,0 +1,13 @@
|
||||
import VueDevtools from 'vite-plugin-vue-devtools';
|
||||
|
||||
export function setupDevtoolsPlugin(viteEnv: Env.ImportMeta) {
|
||||
const { VITE_DEVTOOLS_ENABLED, VITE_DEVTOOLS_LAUNCH_EDITOR } = viteEnv;
|
||||
|
||||
if (VITE_DEVTOOLS_ENABLED !== 'Y') {
|
||||
return null;
|
||||
}
|
||||
|
||||
return VueDevtools({
|
||||
launchEditor: VITE_DEVTOOLS_LAUNCH_EDITOR
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user