removing a few unused deps
This commit is contained in:
parent
6715e071f2
commit
a3d4576247
3 changed files with 2 additions and 8 deletions
|
@ -39,8 +39,6 @@ export async function ssgBuild({ loader, staticImages, config, outDir, logLevel
|
||||||
)}`,
|
)}`,
|
||||||
});
|
});
|
||||||
|
|
||||||
const inputFiles = new Set<string>();
|
|
||||||
|
|
||||||
async function processStaticImage([src, transformsMap]: [
|
async function processStaticImage([src, transformsMap]: [
|
||||||
string,
|
string,
|
||||||
Map<string, TransformOptions>
|
Map<string, TransformOptions>
|
||||||
|
@ -61,9 +59,6 @@ export async function ssgBuild({ loader, staticImages, config, outDir, logLevel
|
||||||
const inputFileURL = new URL(`.${src}`, outDir);
|
const inputFileURL = new URL(`.${src}`, outDir);
|
||||||
inputFile = fileURLToPath(inputFileURL);
|
inputFile = fileURLToPath(inputFileURL);
|
||||||
inputBuffer = await loadLocalImage(inputFile);
|
inputBuffer = await loadLocalImage(inputFile);
|
||||||
|
|
||||||
// track the local file used so the original can be copied over
|
|
||||||
inputFiles.add(inputFile);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!inputBuffer) {
|
if (!inputBuffer) {
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
import type { AstroConfig, AstroIntegration } from 'astro';
|
import type { AstroConfig, AstroIntegration } from 'astro';
|
||||||
import fs from 'node:fs/promises';
|
|
||||||
import path from 'node:path';
|
|
||||||
import { ssgBuild } from './build/ssg.js';
|
import { ssgBuild } from './build/ssg.js';
|
||||||
import type { ImageService, TransformOptions } from './loaders/index.js';
|
import type { ImageService, TransformOptions } from './loaders/index.js';
|
||||||
import type { LoggerLevel } from './utils/logger.js';
|
import type { LoggerLevel } from './utils/logger.js';
|
||||||
|
@ -50,13 +48,13 @@ export default function integration(options: IntegrationOptions = {}): AstroInte
|
||||||
optimizeDeps: {
|
optimizeDeps: {
|
||||||
include: [
|
include: [
|
||||||
'image-size',
|
'image-size',
|
||||||
'@squoosh/lib',
|
|
||||||
resolvedOptions.serviceEntryPoint === '@astrojs/image/sharp' && 'sharp',
|
resolvedOptions.serviceEntryPoint === '@astrojs/image/sharp' && 'sharp',
|
||||||
].filter(Boolean),
|
].filter(Boolean),
|
||||||
},
|
},
|
||||||
ssr: {
|
ssr: {
|
||||||
noExternal: ['@astrojs/image', resolvedOptions.serviceEntryPoint],
|
noExternal: ['@astrojs/image', resolvedOptions.serviceEntryPoint],
|
||||||
},
|
},
|
||||||
|
assetsInclude: ['**/*.wasm']
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import sharp from 'sharp';
|
import sharp from 'sharp';
|
||||||
import { BaseSSRService } from '../loaders/index.js';
|
import { BaseSSRService } from '../loaders/index.js';
|
||||||
|
import type { SSRImageService } from '../loaders/index.js';
|
||||||
import type { OutputFormat, TransformOptions } from './index.js';
|
import type { OutputFormat, TransformOptions } from './index.js';
|
||||||
|
|
||||||
class SharpService extends BaseSSRService {
|
class SharpService extends BaseSSRService {
|
||||||
|
|
Loading…
Add table
Reference in a new issue