diff --git a/packages/integrations/image/src/build/ssg.ts b/packages/integrations/image/src/build/ssg.ts index 9219b9afd..cda7f76ef 100644 --- a/packages/integrations/image/src/build/ssg.ts +++ b/packages/integrations/image/src/build/ssg.ts @@ -39,8 +39,6 @@ export async function ssgBuild({ loader, staticImages, config, outDir, logLevel )}`, }); - const inputFiles = new Set(); - async function processStaticImage([src, transformsMap]: [ string, Map @@ -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) { diff --git a/packages/integrations/image/src/index.ts b/packages/integrations/image/src/index.ts index e9ad1a15a..e195baac7 100644 --- a/packages/integrations/image/src/index.ts +++ b/packages/integrations/image/src/index.ts @@ -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'] }; } diff --git a/packages/integrations/image/src/loaders/sharp.ts b/packages/integrations/image/src/loaders/sharp.ts index 71d947a9d..7d5e9973c 100644 --- a/packages/integrations/image/src/loaders/sharp.ts +++ b/packages/integrations/image/src/loaders/sharp.ts @@ -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 {