You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sims-hq/apps/pos/build-main.mjs

17 lines
372 B
JavaScript

import { build } from 'esbuild'
for (const [entry, out] of [
['electron/main.ts', 'dist-electron/main.cjs'],
['electron/preload.ts', 'dist-electron/preload.cjs'],
]) {
await build({
entryPoints: [entry],
outfile: out,
bundle: true,
platform: 'node',
format: 'cjs',
external: ['electron'],
})
}
console.log('electron main + preload built')