Skip to content

filesystem cache corruption on SIGINT #2918

@AprilArcus

Description

@AprilArcus

If webpack-cli is terminated by SIGINT while writing to the filesystem cache (e.g. in watch mode during an incremental rebuild of a project with large external source maps), the filesystem cache will be corrupted and must be erased before webpack will build again.

webpack-cli should hook SIGINT and await a clean exit from compiler.close.

Note that the child processes spawned by e.g. fork-ts-checker-webpack-plugin or thread-loader will hear SIGINT from the parent process, so they'll need to be isolated by spawning the compiler into a detached child process.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions