fuzzyworld

dao-game / react / files / tools / settings.ts

Branch react · default branch · all branches

settings.ts

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

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