Repository: withastro/astro
File: packages/astro/src/assets/vite-plugin-assets.ts (TypeScript)

Code before:
				filter: {
					id: new RegExp(`^(${VIRTUAL_SERVICE_ID}|${VIRTUAL_MODULE_ID})$`),
				},
				async handler(id) {
					if (id === VIRTUAL_SERVICE_ID) {
						if (isAstroServerEnvironment(this.environment)) {
							return await this.resolve(settings.config.image.service.entrypoint);
						}
						return await this.resolve('astro/assets/services/noop');
					}
					if (id === VIRTUAL_MODULE_ID) {
						return RESOLVED_VIRTUAL_MODULE_ID;
					}
				},
			},
			load: {
				filter: {
					id: new RegExp(`^(${RESOLVED_VIRTUAL_MODULE_ID})$`),
				},
				handler() {
					return {
						code: `
						import { getConfiguredImageService as _getConfiguredImageService } from "astro/assets";
							export {  isLocalService } from "astro/assets";
						import { getImage as getImageInternal } from "astro/assets";
						${settings.config.image.responsiveStyles ? `import "${VIRTUAL_IMAGE_STYLES_ID}";` : ''}
						export { default as Image } from "astro/components/${imageComponentPrefix}Image.astro";
						export { default as Picture } from "astro/components/${imageComponentPrefix}Picture.astro";
						import { inferRemoteSize as inferRemoteSizeInternal } from "astro/assets/utils/inferRemoteSize.js";

						export { default as Font } from "astro/components/Font.astro";
						export * from "${RUNTIME_VIRTUAL_MODULE_ID}";
						
						export const getConfiguredImageService = _getConfiguredImageService;

							export const viteFSConfig = ${JSON.stringify(resolvedConfig.server.fs ?? {})};

						export const safeModulePaths = new Set(${JSON.stringify(
							// @ts-expect-error safeModulePaths is internal to Vite
							Array.from(resolvedConfig.safeModulePaths ?? []),
						)});

						const assetQueryParams = ${
							settings.adapter?.client?.assetQueryParams
								? `new URLSearchParams(${JSON.stringify(
										Array.from(settings.adapter.client.assetQueryParams.entries()),
									)})`
								: 'undefined'
						};
						export const imageConfig = ${JSON.stringify(settings.config.image)};
						Object.defineProperty(imageConfig, 'assetQueryParams', {

Review comment (suggestion):
```suggestion
						import { getConfiguredImageService as _getConfiguredImageService } from "astro/assets";
						export { isLocalService } from "astro/assets";
						import { getImage as getImageInternal } from "astro/assets";
						${settings.config.image.responsiveStyles ? `import "${VIRTUAL_IMAGE_STYLES_ID}";` : ''}
```

Code after:
				filter: {
					id: new RegExp(`^(${VIRTUAL_SERVICE_ID}|${VIRTUAL_MODULE_ID})$`),
				},
				async handler(id) {
					if (id === VIRTUAL_SERVICE_ID) {
						if (isAstroServerEnvironment(this.environment)) {
							return await this.resolve(settings.config.image.service.entrypoint);
						}
						return await this.resolve('astro/assets/services/noop');
					}
					if (id === VIRTUAL_MODULE_ID) {
						return RESOLVED_VIRTUAL_MODULE_ID;
					}
				},
			},
			load: {
				filter: {
					id: new RegExp(`^(${RESOLVED_VIRTUAL_MODULE_ID})$`),
				},
				handler() {
					return {
						code: `
						import { getConfiguredImageService as _getConfiguredImageService } from "astro/assets";
						export { isLocalService } from "astro/assets";
						import { getImage as getImageInternal } from "astro/assets";
						${settings.config.image.responsiveStyles ? `import "${VIRTUAL_IMAGE_STYLES_ID}";` : ''}
						export { default as Image } from "astro/components/${imageComponentPrefix}Image.astro";
						export { default as Picture } from "astro/components/${imageComponentPrefix}Picture.astro";
						import { inferRemoteSize as inferRemoteSizeInternal } from "astro/assets/utils/inferRemoteSize.js";

						export { default as Font } from "astro/components/Font.astro";
						export * from "${RUNTIME_VIRTUAL_MODULE_ID}";
						
						export const getConfiguredImageService = _getConfiguredImageService;

							export const viteFSConfig = ${JSON.stringify(resolvedConfig.server.fs ?? {})};

						export const safeModulePaths = new Set(${JSON.stringify(
							// @ts-expect-error safeModulePaths is internal to Vite
							Array.from(resolvedConfig.safeModulePaths ?? []),
						)});

						const assetQueryParams = ${
							settings.adapter?.client?.assetQueryParams
								? `new URLSearchParams(${JSON.stringify(
										Array.from(settings.adapter.client.assetQueryParams.entries()),
									)})`
								: 'undefined'
						};
						export const imageConfig = ${JSON.stringify(settings.config.image)};
						Object.defineProperty(imageConfig, 'assetQueryParams', {