Files
openclaw/apps/shared/OpenClawKit/Tools/CanvasA2UI/rolldown.config.mjs

46 lines
1.5 KiB
JavaScript
Raw Normal View History

2025-12-17 11:35:06 +01:00
import path from "node:path";
2025-12-18 11:38:32 +01:00
import { fileURLToPath } from "node:url";
2025-12-17 11:35:06 +01:00
import { defineConfig } from "rolldown";
2025-12-18 11:38:32 +01:00
const here = path.dirname(fileURLToPath(import.meta.url));
const repoRoot = path.resolve(here, "../../../../..");
2025-12-17 11:35:06 +01:00
const fromHere = (p) => path.resolve(here, p);
const outputFile = path.resolve(
here,
"../../../../..",
"src",
"canvas-host",
"a2ui",
"a2ui.bundle.js",
);
2025-12-17 11:35:06 +01:00
const a2uiLitDist = path.resolve(repoRoot, "vendor/a2ui/renderers/lit/dist/src");
const a2uiThemeContext = path.resolve(a2uiLitDist, "0.8/ui/context/theme.js");
export default defineConfig({
input: fromHere("bootstrap.js"),
2025-12-20 14:50:10 +01:00
experimental: {
attachDebugInfo: "none",
},
2025-12-17 11:35:06 +01:00
treeshake: false,
resolve: {
alias: {
"@a2ui/lit": path.resolve(a2uiLitDist, "index.js"),
"@a2ui/lit/ui": path.resolve(a2uiLitDist, "0.8/ui/ui.js"),
2026-01-30 03:15:10 +01:00
"@openclaw/a2ui-theme-context": a2uiThemeContext,
2025-12-17 11:35:06 +01:00
"@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/"),
},
},
output: {
2025-12-18 10:44:06 +01:00
file: outputFile,
2025-12-17 11:35:06 +01:00
format: "esm",
codeSplitting: false,
2025-12-17 11:35:06 +01:00
sourcemap: false,
},
});