This commit is contained in:
29
patches/astro.patch
Normal file
29
patches/astro.patch
Normal file
@@ -0,0 +1,29 @@
|
||||
diff --git a/dist/assets/utils/transformToPath.js b/dist/assets/utils/transformToPath.js
|
||||
index cca8548dec42090b0621d1f21c86f503d5bba1be..8b0a3cfcea73abc4d63592709bb9ba2b2f83989a 100644
|
||||
--- a/dist/assets/utils/transformToPath.js
|
||||
+++ b/dist/assets/utils/transformToPath.js
|
||||
@@ -13,7 +13,9 @@ function propsToFilename(filePath, transform, hash) {
|
||||
}
|
||||
const prefixDirname = isESMImportedImage(transform.src) ? dirname(filePath) : "";
|
||||
let outputExt = transform.format ? `.${transform.format}` : ext;
|
||||
- return decodeURIComponent(`${prefixDirname}/${filename}_${hash}${outputExt}`);
|
||||
+
|
||||
+ // Force disable image optimization - return original path without hash and format conversion
|
||||
+ return decodeURIComponent(`${prefixDirname}/${filename}${ext}`);
|
||||
}
|
||||
function hashTransform(transform, imageService, propertiesToHash) {
|
||||
const hashFields = propertiesToHash.reduce(
|
||||
diff --git a/dist/core/build/generate.js b/dist/core/build/generate.js
|
||||
index 3144f4c058b161b9e6eb3c8d891b743b34783653..0ba275b320204e154307c6aff75452e9dcb2300d 100644
|
||||
--- a/dist/core/build/generate.js
|
||||
+++ b/dist/core/build/generate.js
|
||||
@@ -91,7 +91,8 @@ ${bgGreen(black(` ${verb} static routes `))}`);
|
||||
`)
|
||||
);
|
||||
const staticImageList = getStaticImageList();
|
||||
- if (staticImageList.size) {
|
||||
+ // Force disable image optimization - hardcoded
|
||||
+ if (false) {
|
||||
logger.info("SKIP_FORMAT", `${bgGreen(black(` generating optimized images `))}`);
|
||||
const totalCount = Array.from(staticImageList.values()).map((x) => x.transforms.size).reduce((a, b) => a + b, 0);
|
||||
const cpuCount = os.cpus().length;
|
||||
Reference in New Issue
Block a user