[ci] yarn format
This commit is contained in:
parent
c9d833ee0b
commit
00c6dec8eb
3 changed files with 25 additions and 20 deletions
|
@ -69,13 +69,15 @@ setup("${astroId}", async () => {
|
|||
const getComponentName = (Component: any, componentProps: any) => {
|
||||
if (componentProps.displayName) return componentProps.displayName;
|
||||
switch (typeof Component) {
|
||||
case 'function': return Component.displayName ?? Component.name;
|
||||
case 'string': return Component;
|
||||
case 'function':
|
||||
return Component.displayName ?? Component.name;
|
||||
case 'string':
|
||||
return Component;
|
||||
default: {
|
||||
return Component;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const __astro_component = (Component: any, componentProps: AstroComponentProps = {} as any) => {
|
||||
if (Component == null) {
|
||||
|
|
|
@ -304,10 +304,14 @@ async function createSnowpack(astroConfig: AstroConfig, options: CreateSnowpackO
|
|||
(process.env as any).TAILWIND_DISABLE_TOUCH = true;
|
||||
}
|
||||
|
||||
const rendererInstances = (await Promise.all(renderers.map((renderer) => {
|
||||
const entrypoint = pathToFileURL(resolveDependency(renderer)).toString();
|
||||
return import(entrypoint);
|
||||
}))).map(({ default: raw }, i) => {
|
||||
const rendererInstances = (
|
||||
await Promise.all(
|
||||
renderers.map((renderer) => {
|
||||
const entrypoint = pathToFileURL(resolveDependency(renderer)).toString();
|
||||
return import(entrypoint);
|
||||
})
|
||||
)
|
||||
).map(({ default: raw }, i) => {
|
||||
const { name = renderers[i], client, server, snowpackPlugin: snowpackPluginName, snowpackPluginOptions } = raw;
|
||||
|
||||
if (typeof client !== 'string') {
|
||||
|
@ -376,7 +380,7 @@ async function createSnowpack(astroConfig: AstroConfig, options: CreateSnowpackO
|
|||
},
|
||||
packageOptions: {
|
||||
knownEntrypoints,
|
||||
external: snowpackExternals
|
||||
external: snowpackExternals,
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
@ -1,18 +1,17 @@
|
|||
/* App.svelte generated by Svelte v3.38.2 */
|
||||
import {
|
||||
create_ssr_component,
|
||||
missing_component,
|
||||
validate_component
|
||||
} from "svelte/internal";
|
||||
import { create_ssr_component, missing_component, validate_component } from 'svelte/internal';
|
||||
|
||||
const App = create_ssr_component(($$result, $$props, $$bindings, slots) => {
|
||||
const { __astro_component: Component, __astro_children, ...props } = $$props;
|
||||
const { __astro_component: Component, __astro_children, ...props } = $$props;
|
||||
|
||||
return `${validate_component(Component || missing_component, "svelte:component").$$render($$result, Object.assign(props), {}, {
|
||||
default: () => `${__astro_children
|
||||
? `<astro-fragment>${__astro_children}</astro-fragment>`
|
||||
: ``}`
|
||||
})}`;
|
||||
return `${validate_component(Component || missing_component, 'svelte:component').$$render(
|
||||
$$result,
|
||||
Object.assign(props),
|
||||
{},
|
||||
{
|
||||
default: () => `${__astro_children ? `<astro-fragment>${__astro_children}</astro-fragment>` : ``}`,
|
||||
}
|
||||
)}`;
|
||||
});
|
||||
|
||||
export default App;
|
||||
|
|
Loading…
Reference in a new issue