[ci] format

This commit is contained in:
natemoo-re 2022-05-19 15:50:10 +00:00 committed by github-actions[bot]
parent d34859d750
commit e9c137cf5f
2 changed files with 5 additions and 3 deletions

View file

@ -182,7 +182,9 @@ export default function astro({ config, logging }: AstroPluginOptions): vite.Plu
});
let SUFFIX = '';
SUFFIX += `\nconst $$file = ${JSON.stringify(file)};\nconst $$url = ${JSON.stringify(url)};export { $$file as file, $$url as url };\n`;
SUFFIX += `\nconst $$file = ${JSON.stringify(file)};\nconst $$url = ${JSON.stringify(
url
)};export { $$file as file, $$url as url };\n`;
// Add HMR handling in dev mode.
if (!resolvedConfig.isProduction) {
// HACK: extract dependencies from metadata until compiler static extraction handles them

View file

@ -8,8 +8,8 @@ export function getFileInfo(id: string, config: AstroConfig) {
const fileId = id.split('?')[0];
let fileUrl = fileId.includes('/pages/')
? fileId.replace(/^.*?\/pages\//, sitePathname).replace(/(\/index)?\.(md|astro)$/, '')
: undefined;
? fileId.replace(/^.*?\/pages\//, sitePathname).replace(/(\/index)?\.(md|astro)$/, '')
: undefined;
if (fileUrl && config.trailingSlash === 'always') {
fileUrl = appendForwardSlash(fileUrl);
}