14 lines
329 B
TypeScript
14 lines
329 B
TypeScript
|
|
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
|
||
|
|
});
|
||
|
|
}
|