defaulting to Sharp for the initial @next release
This commit is contained in:
parent
e6e375cceb
commit
1a8d4f7f60
3 changed files with 6 additions and 4 deletions
|
@ -32,7 +32,7 @@ export interface IntegrationOptions {
|
|||
|
||||
export default function integration(options: IntegrationOptions = {}): AstroIntegration {
|
||||
const resolvedOptions = {
|
||||
serviceEntryPoint: '@astrojs/image/squoosh',
|
||||
serviceEntryPoint: '@astrojs/image/sharp',
|
||||
logLevel: 'info' as LoggerLevel,
|
||||
...options,
|
||||
};
|
||||
|
@ -106,7 +106,9 @@ export default function integration(options: IntegrationOptions = {}): AstroInte
|
|||
: {};
|
||||
},
|
||||
'astro:build:done': async ({ dir }) => {
|
||||
if (resolvedOptions.serviceEntryPoint === '@astrojs/image/squoosh') {
|
||||
await copyLibFiles(_config.output === 'static' ? dir : _buildConfig.server);
|
||||
}
|
||||
|
||||
if (_config.output === 'static') {
|
||||
// for SSG builds, build all requested image transforms to dist
|
||||
|
|
|
@ -6,7 +6,7 @@ import type {
|
|||
TransformOptions,
|
||||
} from '../loaders/index.js';
|
||||
import { isSSRService, parseAspectRatio } from '../loaders/index.js';
|
||||
import sharp from '../loaders/squoosh.js';
|
||||
import sharp from '../loaders/sharp.js';
|
||||
import { isRemoteImage } from '../utils/paths.js';
|
||||
import type { ImageMetadata } from '../vite-plugin-astro-image.js';
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ import slash from 'slash';
|
|||
import type { Plugin, ResolvedConfig } from 'vite';
|
||||
import type { IntegrationOptions } from './index.js';
|
||||
import type { InputFormat } from './loaders/index.js';
|
||||
import sharp from './loaders/squoosh.js';
|
||||
import sharp from './loaders/sharp.js';
|
||||
import { metadata } from './utils/metadata.js';
|
||||
|
||||
export interface ImageMetadata {
|
||||
|
|
Loading…
Reference in a new issue