[ci] format
This commit is contained in:
parent
f8f4d49aba
commit
cb5dbcc51f
3 changed files with 8 additions and 7 deletions
|
@ -2,7 +2,6 @@ import * as eslexer from 'es-module-lexer';
|
|||
import glob from 'fast-glob';
|
||||
import fs from 'fs';
|
||||
import { bgGreen, bgMagenta, black, dim } from 'kleur/colors';
|
||||
import path from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
import * as vite from 'vite';
|
||||
import { astroBundleDelayedAssetPlugin } from '../../content/index.js';
|
||||
|
@ -10,9 +9,8 @@ import {
|
|||
BuildInternals,
|
||||
createBuildInternals,
|
||||
eachPrerenderedPageData,
|
||||
isHoistedScript,
|
||||
} from '../../core/build/internal.js';
|
||||
import { emptyDir, removeDir, removeEmptyDirs } from '../../core/fs/index.js';
|
||||
import { emptyDir, removeEmptyDirs } from '../../core/fs/index.js';
|
||||
import { appendForwardSlash, prependForwardSlash } from '../../core/path.js';
|
||||
import { isModeServerWithNoAdapter } from '../../core/util.js';
|
||||
import { runHookBuildSetup } from '../../integrations/index.js';
|
||||
|
|
|
@ -17,10 +17,10 @@ export function removeEmptyDirs(root: URL): void {
|
|||
let files = fs.readdirSync(dir);
|
||||
|
||||
if (files.length > 0) {
|
||||
files.map(file => {
|
||||
files.map((file) => {
|
||||
const url = new URL(`./${file}`, appendForwardSlash(root.toString()));
|
||||
removeEmptyDirs(url);
|
||||
})
|
||||
});
|
||||
files = fs.readdirSync(dir);
|
||||
}
|
||||
|
||||
|
|
|
@ -172,7 +172,10 @@ export async function ssgBuild({
|
|||
let outputFileURL: URL;
|
||||
|
||||
if (isRemoteImage(src)) {
|
||||
outputFileURL = new URL(path.join(`./${config.build.assets}`, path.basename(filename)), outDir);
|
||||
outputFileURL = new URL(
|
||||
path.join(`./${config.build.assets}`, path.basename(filename)),
|
||||
outDir
|
||||
);
|
||||
outputFile = fileURLToPath(outputFileURL);
|
||||
} else {
|
||||
outputFileURL = new URL(path.join(`./${config.build.assets}`, filename), outDir);
|
||||
|
|
Loading…
Reference in a new issue