message: feat: esbuild --watch
diff: /* eslint-disable @typescript-eslint/no-var-requires */
  -async function start() {
  +async function start(watch) {
  await require('esbuild').build({
  entryPoints: ['src/index.ts'],
  bundle: true,
  + watch,
  minify: process.env.NODE_ENV === 'production',
  sourcemap: process.env.NODE_ENV === 'development',
  mainFields: ['module', 'main'],
  @@ -13,6 +14,20 @@ async function start() {
  });
  }
  -start().catch((e) => {
  +let watch = false;
  +if (process.argv.length > 2 && process.argv[2] === '--watch') {
  + console.log('watching...');
  + watch = {
  + onRebuild(error) {
  + if (error) {
  + console.error('watch build failed:', error);
  + } else {
  + console.log('watch build succeeded');
  + }
  + },
  + };
  +}
  +
  +start(watch).catch((e) => {
  console.error(e);
  });
  