mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-18 20:47:27 +00:00
chore: remove root long and rolldown deps (#22481)
* chore(deadcode): add deadcode scanning and remove unused lockfile deps * chore(changelog): mention deadcode CI scan pass * ci: disable deadcode job temporarily * docs(changelog): add PR ref and thanks for deadcode scan entry * ci: comment out deadcode job condition while keeping it disabled * Deps: remove dead root dependency from package manifest * Changelog: reference PR for deadcode dependency cleanup * Deps: remove unused root signal-utils * Chore: remove unused lit context deps * Chore: remove unused root lit dependency * Chore: remove root long and rolldown deps * Chore: add changelog for root long/rolldown removal * Chore: fix a2ui bundling after root lit dependency removal * Chore: simplify a2ui bundle script dependencies
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import path from "node:path";
|
||||
import { existsSync } from "node:fs";
|
||||
import { fileURLToPath } from "node:url";
|
||||
import { defineConfig } from "rolldown";
|
||||
|
||||
@@ -16,6 +17,17 @@ const outputFile = path.resolve(
|
||||
|
||||
const a2uiLitDist = path.resolve(repoRoot, "vendor/a2ui/renderers/lit/dist/src");
|
||||
const a2uiThemeContext = path.resolve(a2uiLitDist, "0.8/ui/context/theme.js");
|
||||
const a2uiNodeModules = path.resolve(repoRoot, "ui/node_modules");
|
||||
const rootNodeModules = path.resolve(repoRoot, "node_modules");
|
||||
|
||||
const resolveA2uiDep = (pkg, rel = "") => {
|
||||
const uiPath = path.resolve(a2uiNodeModules, pkg, rel);
|
||||
if (existsSync(uiPath)) {
|
||||
return uiPath;
|
||||
}
|
||||
|
||||
return path.resolve(rootNodeModules, pkg, rel);
|
||||
};
|
||||
|
||||
export default defineConfig({
|
||||
input: fromHere("bootstrap.js"),
|
||||
@@ -28,12 +40,13 @@ export default defineConfig({
|
||||
"@a2ui/lit": path.resolve(a2uiLitDist, "index.js"),
|
||||
"@a2ui/lit/ui": path.resolve(a2uiLitDist, "0.8/ui/ui.js"),
|
||||
"@openclaw/a2ui-theme-context": a2uiThemeContext,
|
||||
"@lit/context": path.resolve(repoRoot, "node_modules/@lit/context/index.js"),
|
||||
"@lit/context/": path.resolve(repoRoot, "node_modules/@lit/context/"),
|
||||
"@lit-labs/signals": path.resolve(repoRoot, "node_modules/@lit-labs/signals/index.js"),
|
||||
"@lit-labs/signals/": path.resolve(repoRoot, "node_modules/@lit-labs/signals/"),
|
||||
lit: path.resolve(repoRoot, "node_modules/lit/index.js"),
|
||||
"lit/": path.resolve(repoRoot, "node_modules/lit/"),
|
||||
"@lit/context": resolveA2uiDep("@lit/context", "index.js"),
|
||||
"@lit/context/": resolveA2uiDep("@lit/context"),
|
||||
"@lit-labs/signals": resolveA2uiDep("@lit-labs/signals", "index.js"),
|
||||
"@lit-labs/signals/": resolveA2uiDep("@lit-labs/signals"),
|
||||
lit: resolveA2uiDep("lit", "index.js"),
|
||||
"lit/": resolveA2uiDep("lit"),
|
||||
"signal-utils/": resolveA2uiDep("signal-utils"),
|
||||
},
|
||||
},
|
||||
output: {
|
||||
|
||||
Reference in New Issue
Block a user