@vistagenic/vista 0.2.9 → 0.2.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -31,8 +31,13 @@ function getImgProps(props, config = image_config_1.imageConfigDefault, defaultL
31
31
  // Handle Dimensions
32
32
  let widthInt = width ? Number(width) : undefined;
33
33
  let heightInt = height ? Number(height) : undefined;
34
+ const vercelStaticBuild = typeof window === 'undefined' &&
35
+ (process.env.VERCEL === '1' || typeof process.env.VERCEL_URL === 'string');
36
+ // Disable optimizer when explicitly requested, configured globally,
37
+ // or when building for Vercel static output (no /_vista/image endpoint).
38
+ const disableOptimization = !!unoptimized || !!config.unoptimized || vercelStaticBuild;
34
39
  // Generate SrcSet
35
- const srcSet = generateSrcSet(src, widthInt, loader, config, !!unoptimized);
40
+ const srcSet = generateSrcSet(src, widthInt, loader, config, disableOptimization);
36
41
  return {
37
42
  ...rest,
38
43
  src,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vistagenic/vista",
3
- "version": "0.2.9",
3
+ "version": "0.2.10",
4
4
  "description": "The React Framework for Visionaries - Rust-powered SSR with Server Components",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",