@storm-software/unbuild
Version:
A package containing `unbuild` utilities for building Storm Software libraries and applications
32 lines (22 loc) • 946 B
JavaScript
;Object.defineProperty(exports, "__esModule", {value: true});
var _chunk4D3WT42Ncjs = require('./chunk-4D3WT42N.cjs');
var _chunkBGYQAVKQcjs = require('./chunk-BGYQAVKQ.cjs');
// src/plugins/on-error.ts
var onErrorPlugin = /* @__PURE__ */ _chunkBGYQAVKQcjs.__name.call(void 0, (options) => ({
name: "storm:on-error",
buildEnd(error) {
if (error) {
_chunk4D3WT42Ncjs.writeError.call(void 0, `The following errors occurred during the build:
${error ? error.message : "Unknown build error"}
`, options.config);
throw new Error("Storm unbuild process failed with errors.");
}
},
renderError(error) {
_chunk4D3WT42Ncjs.writeError.call(void 0, `The following errors occurred during the build:
${error ? error.message : "Unknown build error"}
`, options.config);
throw new Error("Storm unbuild process failed with errors.");
}
}), "onErrorPlugin");
exports.onErrorPlugin = onErrorPlugin;