Files
dsh-long-skin/scripts/build-client.mjs

30 lines
694 B
JavaScript
Raw Permalink Normal View History

2026-08-14 22:30:15 +08:00
import { build } from "esbuild";
const id = "@leon___/dsh-client-long-intensity-skin";
2026-08-14 22:30:15 +08:00
await build({
entryPoints: ["src/client/index.tsx"],
outfile: "lib/client.js",
bundle: true,
format: "cjs",
platform: "browser",
target: "es2022",
jsx: "automatic",
sourcemap: true,
loader: { ".css": "text" },
external: [
"react",
"react/jsx-runtime",
"@deepseek-ai/dsh-client-ui-primitives",
2026-08-14 22:30:15 +08:00
],
define: {
"process.env.NODE_ENV": '"production"',
},
banner: {
js: `window.__ModuleLoader__.load({id:${JSON.stringify(id)},factory:(require)=>{var module={exports:{}};var exports=module.exports;`,
},
footer: {
js: "return module.exports;}});",
},
});