0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2025-03-10 23:01:26 -05:00

Remove support for Node 16 (#7780)

This commit is contained in:
Erika 2023-07-24 20:47:07 +02:00 committed by Emanuele Stoppa
parent 286d9698f2
commit 9cad290f73
3 changed files with 5 additions and 4 deletions

View file

@ -55,7 +55,7 @@
"@astrojs/webapi": "^2.2.0",
"@vercel/analytics": "^0.1.11",
"@vercel/nft": "^0.22.6",
"esbuild": "^0.17.19",
"esbuild": "^0.18.16",
"fast-glob": "^3.2.12",
"set-cookie-parser": "^2.6.0",
"web-vitals": "^3.3.2"

View file

@ -1,5 +1,4 @@
import type { LocalImageService } from 'astro';
// @ts-expect-error
import squooshService from 'astro/assets/services/squoosh';
import { sharedValidateOptions } from './shared';
@ -14,7 +13,9 @@ const service: LocalImageService = {
props.width = inputtedWidth;
}
return squooshService.getHTMLAttributes(props, serviceOptions);
return squooshService.getHTMLAttributes
? squooshService.getHTMLAttributes(props, serviceOptions)
: {};
},
getURL(options) {
const fileSrc = typeof options.src === 'string' ? options.src : options.src.src;

View file

@ -5,6 +5,6 @@
"allowJs": true,
"module": "ES2022",
"outDir": "./dist",
"target": "ES2021"
"target": "ES2022"
}
}