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
4d4e34d451
commit
e83b2feeca
1 changed files with 7 additions and 3 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue