[ci] yarn format

This commit is contained in:
matthewp 2021-07-08 18:09:16 +00:00 committed by GitHub Actions
parent 0a7b6deaec
commit c0d4e8430f
2 changed files with 7 additions and 7 deletions

View file

@ -181,7 +181,7 @@ function getComponentWrapper(_name: string, hydration: HydrationAttributes, { ur
let name = _name;
let method = hydration.method;
/** Legacy support for original hydration syntax */
if (name.indexOf(':') > 0) {
const [legacyName, legacyMethod] = _name.split(':');
@ -221,11 +221,11 @@ function getComponentWrapper(_name: string, hydration: HydrationAttributes, { ur
};
const importInfo = method
? {
componentUrl: getComponentUrl(astroConfig, url, pathToFileURL(filename)),
componentExport: getComponentExport()
}
: {};
? {
componentUrl: getComponentUrl(astroConfig, url, pathToFileURL(filename)),
componentExport: getComponentExport(),
}
: {};
return {
wrapper: `__astro_component(${name}, ${JSON.stringify({ hydrate: method, displayName: _name, ...importInfo })})`,

View file

@ -22,7 +22,7 @@ export default function (opts: TransformOptions): Transformer {
InlineComponent: {
enter(node) {
if (hasComponents) {
return
return;
}
if (node.attributes && node.attributes.some(({ name }: any) => name.startsWith('client:'))) {