UNPKG

@storm-software/unbuild

Version:

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

35 lines (27 loc) 857 B
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); var _chunkOHNKWQUWcjs = require('./chunk-OHNKWQUW.cjs'); // src/plugins/on-error.ts var onErrorPlugin = (options) => ({ name: "storm:on-error", buildEnd(error) { if (error) { _chunkOHNKWQUWcjs.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) { _chunkOHNKWQUWcjs.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."); } }); exports.onErrorPlugin = onErrorPlugin;