cloudflare-next-intl 0.8.58 → 0.8.59

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.
@@ -1,6 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import NextImage, { getImageProps as nextGetImageProps } from "next/image";
3
- import manifest from "virtual:cloudflare-next-intl-images-manifest";
4
3
  import { getImageBlurSvg } from "./blur_svg.js";
5
4
  /**
6
5
  * When an image was generated at multiple widths (because it's used at
@@ -19,7 +18,13 @@ function pickVariant(entry, requestedWidth) {
19
18
  }
20
19
  return entry.variants.reduce((best, v) => (v.width > best.width ? v : best));
21
20
  }
22
- const manifestData = manifest;
21
+ let manifestData;
22
+ try {
23
+ manifestData = (await import(/* @vite-ignore */ "virtual:cloudflare-next-intl-images-manifest")).default;
24
+ }
25
+ catch {
26
+ manifestData = undefined;
27
+ }
23
28
  const images = (manifestData && typeof manifestData === "object" && manifestData.images)
24
29
  ? manifestData.images
25
30
  : {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudflare-next-intl",
3
- "version": "0.8.58",
3
+ "version": "0.8.59",
4
4
  "description": "Optimized Next Intl Package Special for App Router and Cloudflare",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",