Skip to content

webpack --watch does not check if stdin was closed #1308

@matthewlehner

Description

@matthewlehner

This is basically a clone of brunch/brunch#920, but for context:

I would like to automatically run webpack --watch as part of my application but, when it shuts down, the webpack process persists and continues running. I have observed that my application does close STDIN, however, webpack --watch is not checking if STDIN was closed or not. These two lines solve the issue:

process.stdin.on('end', function() { process.exit(0) });
process.stdin.resume();

See matthewlehner/webpack@879ab0b for the fix, implemented.

I can send a pull request for this, but am wondering if this should always run this or if it should be it opt-in.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions