mirror of
https://gh-proxy.org/https://github.com/klinsmaya/workdsh.git
synced 2026-11-08 01:17:05 +08:00
git-subtree-dir: workdsh-web git-subtree-mainline:d3a7b2143dgit-subtree-split:03b63ea143
3 lines
683 B
JavaScript
3 lines
683 B
JavaScript
import { build } from 'esbuild'; import { writeFile } from 'node:fs/promises'; import { fileURLToPath } from 'node:url';
|
|
const entry=new URL('../packages/plugins/projects/',import.meta.url);const result=await build({entryPoints:[fileURLToPath(new URL('src/client.tsx',entry))],bundle:true,write:false,format:'cjs',platform:'browser',target:'es2022',external:['@deepseek-ai/dsh-client-ui-primitives','react','react-dom','react/jsx-runtime']});await writeFile(new URL('dist/client.browser.js',entry),`window.__ModuleLoader__.load({id: "workdsh-plugin-projects", factory: function(require) { const module = {exports:{}};\n${result.outputFiles[0].text}\nreturn module.exports; }});\n`);
|