Skip to content

After the build is completed, the esbuild process does not exit #3558

@peakchen90

Description

@peakchen90

When I use esbuild.build api to build, the node process does not exit, but esbuild cannot exit either.

The reproduce code:

const esbuild = require('esbuild');

(async () => {
  await esbuild.build({
    entryPoints: ['./src'],
  });

  console.log(' >>> done');
})();

setTimeout(() => {
  // keep running...
}, 10000000);

The terminal output screenshot:
image

The MacOS monitor screenshot:
image

I discovered this problem because my team member reported that running esbuild watch mode used 54G of memory on his computer.
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions