fuzzyworld

dao-game / peerjs-browser-bug / files / tools / esbuild-settings.ts

Branch peerjs-browser-bug · default branch · all branches

esbuild-settings.ts

Blame: the commit that last changed each line · file · history

5805825c 2022-03-21 Pavel Safronov1import esbuild from 'esbuild';
5648264d 2022-03-22 Pavel Safronov2import fs from 'fs'
5805825c 2022-03-21 Pavel Safronov3
4export const hostPort = 3000;
5648264d 2022-03-22 Pavel Safronov5const outDir = 'public/js';
5805825c 2022-03-21 Pavel Safronov6
7export const serveOptions: esbuild.ServeOptions = {
8 servedir: 'public',
9};
10export const buildOptions: esbuild.BuildOptions = {
e46456c2 2022-03-22 Pavel Safronov11 entryPoints: ['src/local.ts', 'src/remote.ts', 'src/index.ts'],
5805825c 2022-03-21 Pavel Safronov12 bundle: true,
5648264d 2022-03-22 Pavel Safronov13 outdir: outDir,
5805825c 2022-03-21 Pavel Safronov14 sourcemap: true,
e46456c2 2022-03-22 Pavel Safronov15 target: [
16 'es5',
17 'es2016'
18 ]
5805825c 2022-03-21 Pavel Safronov19};
5648264d 2022-03-22 Pavel Safronov20export function clearOutDir() {
21 fs.rmSync(outDir, { recursive: true, force: true });
22}