mirror of
https://github.com/BetterSEQTA/BetterSEQTA-Plus.git
synced 2026-08-28 17:21:05 +00:00
4fda63dedd
Extract shared helpers for home notices, timetable subtitles, and theme images; dedupe global search, Select, and build scripts while preserving behaviour. Add @huggingface/transformers as a direct dependency and resolve ORT WASM paths via require.resolve so pnpm postinstall and Vite can bundle vector search. Co-authored-by: Cursor <cursoragent@cursor.com>
21 lines
504 B
TypeScript
21 lines
504 B
TypeScript
// ref: https://stackoverflow.com/a/76920975
|
|
import type { Plugin } from "vite";
|
|
|
|
/** Exit with code 1 on build failure; do not exit on success (multi-target builds). */
|
|
export default function ClosePlugin(): Plugin {
|
|
return {
|
|
name: "ClosePlugin",
|
|
buildEnd(error) {
|
|
if (error) {
|
|
console.error("Error bundling", error);
|
|
process.exit(1);
|
|
} else {
|
|
console.log("Build ended");
|
|
}
|
|
},
|
|
closeBundle() {
|
|
console.log("Bundle closed");
|
|
},
|
|
};
|
|
}
|