How to abort compilation using plugin API

Hello @sokra,

I would like to abort compilation based on some conditions:

function abortIf(callback) {
    callback(true);
}

function AbortCompilationPlugin() {}

AbortCompilationPlugin.prototype.apply = function(compiler) {
    abortIf(function(flag) {
        if (flag === true) {
            // TODO abort compilation
        }
    });
};

How to do it via plugin API?

Author: Fantashit

1 thought on “How to abort compilation using plugin API

Comments are closed.