@uniweb/build 1.23.6 → 1.23.7
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniweb/build",
|
|
3
|
-
"version": "1.23.
|
|
3
|
+
"version": "1.23.7",
|
|
4
4
|
"description": "Build tooling for the Uniweb Component Web Platform",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -57,12 +57,12 @@
|
|
|
57
57
|
"js-yaml": "^4.3.2",
|
|
58
58
|
"sharp": "^0.35.5",
|
|
59
59
|
"yaml": "^2.5.0",
|
|
60
|
-
"@uniweb/content-reader": "~1.5.10",
|
|
61
60
|
"@uniweb/projections": "~1.2.17",
|
|
61
|
+
"@uniweb/content-reader": "~1.5.10",
|
|
62
62
|
"@uniweb/schemas": "~1.7.4",
|
|
63
|
+
"@uniweb/content-writer": "~1.3.2",
|
|
63
64
|
"@uniweb/semantic-parser": "~1.13.5",
|
|
64
|
-
"@uniweb/theming": "~1.3.2"
|
|
65
|
-
"@uniweb/content-writer": "~1.3.2"
|
|
65
|
+
"@uniweb/theming": "~1.3.2"
|
|
66
66
|
},
|
|
67
67
|
"optionalDependencies": {
|
|
68
68
|
"@uniweb/runtime": "~1.6.5"
|
|
@@ -74,8 +74,8 @@
|
|
|
74
74
|
"@tailwindcss/vite": "^4.0.0",
|
|
75
75
|
"@vitejs/plugin-react": "^4.0.0 || ^5.0.0",
|
|
76
76
|
"vite-plugin-svgr": "^4.0.0",
|
|
77
|
-
"@uniweb/
|
|
78
|
-
"@uniweb/
|
|
77
|
+
"@uniweb/runtime": "~1.6.5",
|
|
78
|
+
"@uniweb/core": "~1.6.13"
|
|
79
79
|
},
|
|
80
80
|
"peerDependenciesMeta": {
|
|
81
81
|
"vite": {
|
|
@@ -22,6 +22,13 @@ import { prepareImage, isPreparableImage } from '../prepare-image.js'
|
|
|
22
22
|
// Image formats to pass through without conversion
|
|
23
23
|
const PASSTHROUGH_FORMATS = ['.svg', '.webp', '.avif', '.ico']
|
|
24
24
|
|
|
25
|
+
/** What to tell an author whose picture couldn't be read here, by its format: a BMP is drawn by every browser, a HEIC by few. */
|
|
26
|
+
function unreadable(ext) {
|
|
27
|
+
if (ext === '.heic' || ext === '.heif') return "it can't be converted here, and most browsers won't show it. Export it as JPEG."
|
|
28
|
+
if (ext === '.bmp') return "it can't be made smaller here. Export it as PNG or JPEG for a smaller file."
|
|
29
|
+
return "it can't be read here, so check that it opens."
|
|
30
|
+
}
|
|
31
|
+
|
|
25
32
|
/**
|
|
26
33
|
* Prefix a root-relative URL with the site's base path.
|
|
27
34
|
*
|
|
@@ -105,7 +112,7 @@ export async function processAsset(asset, options = {}) {
|
|
|
105
112
|
// its colour profile converted away, and a phone's location kept in a JPEG nothing converted.
|
|
106
113
|
const prepared = await prepareImage(await readFile(resolved), ext, quality ? { quality } : undefined)
|
|
107
114
|
if (prepared.unreadable) {
|
|
108
|
-
console.warn(`[asset-processor] ${basename(resolved)} is copied as it is:
|
|
115
|
+
console.warn(`[asset-processor] ${basename(resolved)} is copied as it is: ${unreadable(ext)}`)
|
|
109
116
|
}
|
|
110
117
|
outputBuffer = prepared.bytes
|
|
111
118
|
outputExt = `.${prepared.ext}`
|