Skip to content

Commit a0189c1

Browse files
authored
refactor: drop react and warn-once from CLI (#4801)
Here removed image package from CLI which depends on react and warn-once. CLI can be a little smaller without it.
1 parent eb2a275 commit a0189c1

File tree

3 files changed

+5
-14
lines changed

3 files changed

+5
-14
lines changed

packages/cli/package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,8 @@
4242
"p-limit": "^6.2.0",
4343
"parse5": "7.2.1",
4444
"picocolors": "^1.1.1",
45-
"react": "18.3.0-canary-14898b6a9-20240318",
4645
"reserved-identifiers": "^1.0.0",
4746
"tinyexec": "^0.3.2",
48-
"warn-once": "^0.1.1",
4947
"yargs": "^17.7.2",
5048
"zod": "^3.22.4"
5149
},
@@ -77,6 +75,7 @@
7775
"h3": "^1.14.0",
7876
"ipx": "^3.0.1",
7977
"prettier": "3.4.2",
78+
"react": "18.3.0-canary-14898b6a9-20240318",
8079
"react-dom": "18.3.0-canary-14898b6a9-20240318",
8180
"react-router": "^7.1.3",
8281
"ts-expect": "^1.3.0",

packages/cli/src/prebuild.ts

+1-6
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ import {
4949
coreMetas,
5050
} from "@webstudio-is/sdk";
5151
import type { Data } from "@webstudio-is/http-client";
52-
import { wsImageLoader } from "@webstudio-is/image";
5352
import { LOCAL_DATA_FILE } from "./config";
5453
import {
5554
createFileIfNotExists,
@@ -443,14 +442,10 @@ export const prebuild = async (options: {
443442

444443
for (const asset of siteData.assets) {
445444
if (asset.type === "image") {
446-
const imagePath = wsImageLoader({
447-
src: asset.name,
448-
format: "raw",
449-
});
450445
assetsToDownload.push(
451446
limit(() =>
452447
downloadAsset(
453-
`${assetOrigin}${imagePath}`,
448+
`${assetOrigin}/cgi/image/${asset.name}?format=auto`,
454449
asset.name,
455450
assetBaseUrl
456451
)

pnpm-lock.yaml

+3-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)