blob: 37bdc53e69d7933c7d6c36da1cb6dd18a604449f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
import esbuild from 'esbuild';
import config from './esbuild.config.mjs';
function buildClient() {
return esbuild.build({
...config,
watch: true,
entryPoints: ['packages/client/src/index.ts'],
outfile: 'dist/index.js',
});
}
function buildServer() {
return esbuild.build({
...config,
watch: true,
entryPoints: ['packages/server/src/index.ts'],
outfile: 'dist/server.js',
});
}
async function watch() {
await Promise.all([buildClient(), buildServer()]);
console.log('👀 Watching for changes...');
}
watch();
|