0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-27 22:19:04 -05:00

[ci] format

This commit is contained in:
Amumu 2023-12-05 20:08:47 +00:00 committed by astrobot-houston
parent 4d4e34d451
commit e83b2feeca

View file

@ -56,7 +56,9 @@ function virtualAppEntrypoint(options: ViteOptions) {
try { try {
let resolved; let resolved;
if (options.appEntrypoint.startsWith('.')) { if (options.appEntrypoint.startsWith('.')) {
resolved = await this.resolve(fileURLToPath(new URL(options.appEntrypoint, options.root))); resolved = await this.resolve(
fileURLToPath(new URL(options.appEntrypoint, options.root))
);
} else { } else {
resolved = await this.resolve(options.appEntrypoint, fileURLToPath(options.root)); resolved = await this.resolve(options.appEntrypoint, fileURLToPath(options.root));
} }
@ -73,12 +75,14 @@ function virtualAppEntrypoint(options: ViteOptions) {
} }
return `export { default as setup } from "${resolved.id}";`; return `export { default as setup } from "${resolved.id}";`;
} catch { } catch {
options.logger.warn(`Unable to resolve appEntrypoint \`${options.appEntrypoint}\`. Does the file exist?`); options.logger.warn(
`Unable to resolve appEntrypoint \`${options.appEntrypoint}\`. Does the file exist?`
);
} }
} }
return noop; return noop;
} }
} },
} satisfies Rollup.Plugin; } satisfies Rollup.Plugin;
} }