UNPKG

@storm-software/unbuild

Version:

A package containing `unbuild` utilities for building Storm Software libraries and applications

32 lines (27 loc) 749 B
import { writeError } from "./chunk-WH7FLZNL.js"; import { __name } from "./chunk-3GQAWCBQ.js"; // src/plugins/on-error.ts var onErrorPlugin = /* @__PURE__ */ __name((options) => ({ name: "storm:on-error", buildEnd(error) { if (error) { writeError(`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) { writeError(`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"); export { onErrorPlugin };