mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-08 11:38:51 +01:00
23 lines
580 B
TypeScript
23 lines
580 B
TypeScript
|
|
export default function ClosePlugin() {
|
||
|
|
return {
|
||
|
|
name: 'ClosePlugin', // required, will show up in warnings and errors
|
||
|
|
|
||
|
|
// use this to catch errors when building
|
||
|
|
buildEnd(error) {
|
||
|
|
if(error) {
|
||
|
|
console.error('Error bundling')
|
||
|
|
console.error(error)
|
||
|
|
process.exit(1)
|
||
|
|
} else {
|
||
|
|
console.log('Build ended')
|
||
|
|
}
|
||
|
|
},
|
||
|
|
|
||
|
|
// use this to catch the end of a build without errors
|
||
|
|
closeBundle(id) {
|
||
|
|
console.log('Bundle closed')
|
||
|
|
process.exit(0)
|
||
|
|
},
|
||
|
|
}
|
||
|
|
}
|