0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-01-20 22:12:38 -05:00

[ci] yarn format

This commit is contained in:
matthewp 2022-01-19 13:26:51 +00:00 committed by GitHub Actions
parent 5208c88aeb
commit b7e8b5dff3

View file

@ -39,19 +39,23 @@ export function createResult(args: CreateResultArgs): SSRResult {
url, url,
}, },
resolve(path: string) { resolve(path: string) {
if(astroConfig.buildOptions.experimentalStaticBuild) { if (astroConfig.buildOptions.experimentalStaticBuild) {
let extra = `This can be replaced with a dynamic import like so: await import("${path}")`; let extra = `This can be replaced with a dynamic import like so: await import("${path}")`;
if(isCSSRequest(path)) { if (isCSSRequest(path)) {
extra = `It looks like you are resolving styles. If you are adding a link tag, replace with this: extra = `It looks like you are resolving styles. If you are adding a link tag, replace with this:
<style global> <style global>
@import "${path}"; @import "${path}";
</style> </style>
` `;
} }
warn(args.logging, `deprecation`, `${bold('Astro.resolve()')} is deprecated. We see that you are trying to resolve ${path}. warn(
${extra}`); args.logging,
`deprecation`,
`${bold('Astro.resolve()')} is deprecated. We see that you are trying to resolve ${path}.
${extra}`
);
// Intentionally return an empty string so that it is not relied upon. // Intentionally return an empty string so that it is not relied upon.
return ''; return '';
} }