-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: process exit after storybook build
- Loading branch information
1 parent
a23fbb5
commit 7ae7f85
Showing
3 changed files
with
32 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
export const exitProcess = () => { | ||
return { | ||
name: 'ExitProcess', // 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) | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters