mirror of
https://github.com/withastro/astro.git
synced 2025-01-27 22:19:04 -05:00
[ci] format
This commit is contained in:
parent
b92de22d28
commit
3dd57f69e3
1 changed files with 4 additions and 4 deletions
|
@ -5,7 +5,7 @@ import type { Options as VueJsxOptions } from '@vitejs/plugin-vue-jsx';
|
|||
import { MagicString } from '@vue/compiler-sfc';
|
||||
import type { AstroIntegration, AstroRenderer, HookParameters } from 'astro';
|
||||
import type { Plugin, UserConfig } from 'vite';
|
||||
import type {VitePluginVueDevToolsOptions} from "vite-plugin-vue-devtools";
|
||||
import type { VitePluginVueDevToolsOptions } from 'vite-plugin-vue-devtools';
|
||||
|
||||
const VIRTUAL_MODULE_ID = 'virtual:@astrojs/vue/app';
|
||||
const RESOLVED_VIRTUAL_MODULE_ID = `\0${VIRTUAL_MODULE_ID}`;
|
||||
|
@ -13,7 +13,7 @@ const RESOLVED_VIRTUAL_MODULE_ID = `\0${VIRTUAL_MODULE_ID}`;
|
|||
interface Options extends VueOptions {
|
||||
jsx?: boolean | VueJsxOptions;
|
||||
appEntrypoint?: string;
|
||||
devtools?: boolean | Omit<VitePluginVueDevToolsOptions, "appendTo">;
|
||||
devtools?: boolean | Omit<VitePluginVueDevToolsOptions, 'appendTo'>;
|
||||
}
|
||||
|
||||
function getRenderer(): AstroRenderer {
|
||||
|
@ -126,11 +126,11 @@ async function getViteConfiguration(
|
|||
|
||||
if (command === 'dev' && options?.devtools) {
|
||||
const vueDevTools = (await import('vite-plugin-vue-devtools')).default;
|
||||
const devToolsOptions = typeof options.devtools === 'object' ? options.devtools : {}
|
||||
const devToolsOptions = typeof options.devtools === 'object' ? options.devtools : {};
|
||||
config.plugins?.push(
|
||||
vueDevTools({
|
||||
...devToolsOptions,
|
||||
appendTo: VIRTUAL_MODULE_ID
|
||||
appendTo: VIRTUAL_MODULE_ID,
|
||||
})
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue