2026-08-14 22:30:15 +08:00
|
|
|
import { build } from "esbuild";
|
|
|
|
|
|
2026-10-24 23:06:51 +08:00
|
|
|
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",
|
2026-10-16 16:14:49 +08:00
|
|
|
"@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;}});",
|
|
|
|
|
},
|
|
|
|
|
});
|