removing a few unused deps

This commit is contained in:
Tony Sullivan 2022-09-09 15:44:36 -05:00
parent 6715e071f2
commit a3d4576247
3 changed files with 2 additions and 8 deletions

View file

@ -39,8 +39,6 @@ export async function ssgBuild({ loader, staticImages, config, outDir, logLevel
)}`,
});
const inputFiles = new Set<string>();
async function processStaticImage([src, transformsMap]: [
string,
Map<string, TransformOptions>
@ -61,9 +59,6 @@ export async function ssgBuild({ loader, staticImages, config, outDir, logLevel
const inputFileURL = new URL(`.${src}`, outDir);
inputFile = fileURLToPath(inputFileURL);
inputBuffer = await loadLocalImage(inputFile);
// track the local file used so the original can be copied over
inputFiles.add(inputFile);
}
if (!inputBuffer) {

View file

@ -1,6 +1,4 @@
import type { AstroConfig, AstroIntegration } from 'astro';
import fs from 'node:fs/promises';
import path from 'node:path';
import { ssgBuild } from './build/ssg.js';
import type { ImageService, TransformOptions } from './loaders/index.js';
import type { LoggerLevel } from './utils/logger.js';
@ -50,13 +48,13 @@ export default function integration(options: IntegrationOptions = {}): AstroInte
optimizeDeps: {
include: [
'image-size',
'@squoosh/lib',
resolvedOptions.serviceEntryPoint === '@astrojs/image/sharp' && 'sharp',
].filter(Boolean),
},
ssr: {
noExternal: ['@astrojs/image', resolvedOptions.serviceEntryPoint],
},
assetsInclude: ['**/*.wasm']
};
}

View file

@ -1,5 +1,6 @@
import sharp from 'sharp';
import { BaseSSRService } from '../loaders/index.js';
import type { SSRImageService } from '../loaders/index.js';
import type { OutputFormat, TransformOptions } from './index.js';
class SharpService extends BaseSSRService {