Download scripts/build.mjs from xlt99/EmboDi: direct link, hf CLI and curl.
- Browser
- Download file 488 Bytes
-
https://huggingface.co/spaces/xlt99/EmboDi/resolve/main/scripts/build.mjs
- Command line
-
hf download hf://spaces/xlt99/EmboDi/scripts/build.mjs
-
curl -L -o build.mjs https://huggingface.co/spaces/xlt99/EmboDi/resolve/main/scripts/build.mjs
488 Bytes
| import {build} from 'esbuild'; | |
| import {fileURLToPath} from 'node:url'; | |
| import {join} from 'node:path'; | |
| const root=fileURLToPath(new URL('../',import.meta.url)); | |
| await build({ | |
| absWorkingDir:root, | |
| entryPoints:['src/client/app.mjs'], | |
| outfile:join(root,'public/app.mjs'), | |
| bundle:true, | |
| platform:'browser', | |
| format:'esm', | |
| target:'es2022', | |
| external:['three','three/*'], | |
| treeShaking:true, | |
| minifySyntax:true, | |
| charset:'ascii', | |
| legalComments:'inline', | |
| logLevel:'info', | |
| }); | |