Skip to content

Commit

Permalink
refactor: drop react and warn-once from CLI (#4801)
Browse files Browse the repository at this point in the history
Here removed image package from CLI which depends on react and
warn-once. CLI can be a little smaller without it.
  • Loading branch information
TrySound authored Jan 29, 2025
1 parent eb2a275 commit a0189c1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 14 deletions.
3 changes: 1 addition & 2 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,8 @@
"p-limit": "^6.2.0",
"parse5": "7.2.1",
"picocolors": "^1.1.1",
"react": "18.3.0-canary-14898b6a9-20240318",
"reserved-identifiers": "^1.0.0",
"tinyexec": "^0.3.2",
"warn-once": "^0.1.1",
"yargs": "^17.7.2",
"zod": "^3.22.4"
},
Expand Down Expand Up @@ -77,6 +75,7 @@
"h3": "^1.14.0",
"ipx": "^3.0.1",
"prettier": "3.4.2",
"react": "18.3.0-canary-14898b6a9-20240318",
"react-dom": "18.3.0-canary-14898b6a9-20240318",
"react-router": "^7.1.3",
"ts-expect": "^1.3.0",
Expand Down
7 changes: 1 addition & 6 deletions packages/cli/src/prebuild.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ import {
coreMetas,
} from "@webstudio-is/sdk";
import type { Data } from "@webstudio-is/http-client";
import { wsImageLoader } from "@webstudio-is/image";
import { LOCAL_DATA_FILE } from "./config";
import {
createFileIfNotExists,
Expand Down Expand Up @@ -443,14 +442,10 @@ export const prebuild = async (options: {

for (const asset of siteData.assets) {
if (asset.type === "image") {
const imagePath = wsImageLoader({
src: asset.name,
format: "raw",
});
assetsToDownload.push(
limit(() =>
downloadAsset(
`${assetOrigin}${imagePath}`,
`${assetOrigin}/cgi/image/${asset.name}?format=auto`,
asset.name,
assetBaseUrl
)
Expand Down
9 changes: 3 additions & 6 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a0189c1

Please sign in to comment.