rkk-next 2.0.4 → 2.1.1
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.
|
@@ -16,7 +16,7 @@ const OptimizedImage = ({ quality = 80, priority = false, alt, ...props }) => {
|
|
|
16
16
|
console.warn("[next-optimize-sdk] OptimizedImage requires alt text for SEO");
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
|
-
return (react_1.default.createElement(image_1.default, { ...props, alt: alt, quality: quality, priority:
|
|
19
|
+
return (react_1.default.createElement(image_1.default, { ...props, alt: alt, quality: quality, ...(priority ? { priority: true } : {}), loading: priority ? "eager" : "lazy", sizes: props.sizes ||
|
|
20
20
|
"(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 33vw", placeholder: props.placeholder || "empty" }));
|
|
21
21
|
};
|
|
22
22
|
exports.OptimizedImage = OptimizedImage;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rkk-next",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.1",
|
|
4
4
|
"description": "SEO, routing, performance optimization and backend utilities SDK for Next.js",
|
|
5
5
|
"author": "Rohit Kumar Kundu",
|
|
6
6
|
"license": "MIT",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"test:watch": "jest --watch",
|
|
27
27
|
"test:coverage": "jest --coverage",
|
|
28
28
|
"test:e2e": "jest __tests__/e2e",
|
|
29
|
-
"test:cli": "
|
|
29
|
+
"test:cli": "npm --prefix cli install && npm --prefix cli test",
|
|
30
30
|
"test:ci": "npm run test:coverage && npm run test:e2e && npm run test:cli",
|
|
31
31
|
"prepublishOnly": "npm run build"
|
|
32
32
|
},
|