File size: 488 Bytes
970fc3e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 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',
});
|